Optimized Facebook Chat API with enhanced security and stability
npm install sahu-fca!npm !License !GitHub issues !GitHub forks !GitHub stars
A lightweight, fast, and unofficial API to interact with Facebook Chat programmatically ā perfect for bots, automation, and custom messaging tools.
---
``bash`
npm install sahu-fca
`javascript
const login = require('sahu-fca');
async function login() {
try {
const api = await login({
email: 'your_facebook_email',
password: 'your_password'
});
console.log('ā
Logged in successfully!');
return api;
} catch (error) {
console.error('ā Login failed:', error);
}
}
login();
`
`javascript
const api = await login();
api.sendMessage("Hello from sahu-fca!", "friend_user_id");
š Listen for Messages
api.listen((err, message) => {
if (err) return console.error(err);
console.log('š© Received message:', message.body);
});
`
| Authenticate with Facebook |
| sendMessage() | Send text message |
| listen() | Receive incoming messages |
| getUserInfo() | Fetch user profile data |
| handleRequest()` | Accept/reject friend requests |- MIRAI PROJECT: Click Here
- FCA: Click Here
- ISLAMIC CHAT BOT: Click Here