mostakim-fca
v0.0.3
Published
Custom FCA build by SaGor (forked from fca-unofficial) with extended features and faster updates.
Maintainers
Readme
mostakim-fca
A custom Facebook Chat API (FCA) build with extended features and faster updates. This is an enhanced fork of fca-unofficial with improved functionality and performance.
📋 Features
- 🚀 Extended Functionality - Enhanced features beyond the original FCA
- ⚡ Faster Updates - Regular maintenance and quick bug fixes
- 💬 Facebook Messenger Integration - Full support for Messenger Bot API
- 🔄 Real-time Communication - WebSocket support for live messaging
- 🛡️ Secure - Support for 2FA and modern authentication methods
- 📦 Easy to Use - Simple API for building messenger bots
🔧 Requirements
- Node.js: >= 16.0.0
- npm: Latest version recommended
📦 Installation
Install via npm:
npm install mostakim-fca🚀 Quick Start
const login = require('mostakim-fca');
login({email: "YOUR_EMAIL", password: "YOUR_PASSWORD"}, (err, api) => {
if(err) return console.error(err);
// Send a message
api.sendMessage("Hello!", 1234567890);
// Listen for messages
api.listen((err, event) => {
if(err) return console.error(err);
console.log(event);
});
});📚 Usage Examples
Send a Message
api.sendMessage("Hello World!", threadId);Send an Image
api.sendMessage(
{
body: "Check this out!",
attachments: [require("fs").createReadStream("image.jpg")]
},
threadId
);Get User Info
api.getUserInfo(userIdArray, (err, ret) => {
if(err) return console.error(err);
console.log(ret);
});Listen to Messages
api.listen((err, event) => {
if(err) return console.error(err);
if(event.type === "message") {
console.log(event.body); // Message text
console.log(event.senderID); // Who sent it
}
});🔑 Key Methods
login()- Authenticate with FacebooksendMessage()- Send messageslisten()- Listen for incoming messagesgetUserInfo()- Get user informationgetThreadInfo()- Get thread/conversation infosetTitle()- Change group chat titleaddUserToGroup()- Add users to groupremoveUserFromGroup()- Remove users from group
For more methods and detailed documentation, check the source code in /src.
📦 Dependencies
- axios - HTTP client for API requests
- bluebird - Promise library
- chalk - Terminal string styling
- cheerio - jQuery-like syntax for parsing HTML
- mqtt - MQTT protocol support
- ws - WebSocket client
- sqlite3 - Local database support
- sequelize - ORM for database operations
- And more...
See package.json for the complete list.
⚠️ Important Notes
- This library is unofficial and uses reverse-engineered Facebook APIs
- Facebook may change their API at any time, which could break this library
- Use at your own risk and follow Facebook's Terms of Service
- This is for educational purposes
🐛 Troubleshooting
Login Issues
- Make sure you're using the correct email and password
- Enable "Less secure app access" if using Gmail
- Use an app-specific password if you have 2FA enabled
Connection Issues
- Check your internet connection
- Try reconnecting
- Check if Facebook has made API changes
Message Not Sending
- Verify the thread ID is correct
- Ensure the recipient hasn't blocked you
- Check API rate limits
🤝 Contributing
Found a bug or want to contribute? Feel free to:
- Open an issue on GitHub
- Submit a pull request with improvements
- Share feedback and suggestions
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Credits
- Original fca-unofficial project
- Built and maintained by SaGor
- Forked and enhanced by mostakim-broh
📞 Support
For support and questions:
- Open an issue on GitHub Issues
- Check existing documentation in the source code
- Visit the npm package: https://www.npmjs.com/package/mostakim-fca
⚡ Disclaimer
This is an unofficial library. We are not affiliated with Facebook or Meta Platforms, Inc. Use responsibly and in accordance with Facebook's Terms of Service.
Made with ❤️ by the mostakim-fca community
