
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
sleizprolayer
Advanced tools


Disclaimer: We are not responsible if your account gets banned for spammy activities such as sending lots of messages to people you don't know, sending messages very quickly, sending spammy looking URLs, logging in and out very quickly... Be responsible Facebook citizens.
For changelogs and updates about ws3-fca and all projects, be sure to follow our page.
See below for projects using this API.


You can use cookies editor available in kiwi browser, edge and chrome extension for PC. We the ws3-fca team/contributors are recommending you to use the Firefox app for less logout, or use this website if you have no access on these browsers specially iOS user. Use Appstate Getter here
process.on('unhandledRejection', (reason, promise) => {
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
});
If you encounter errors on fca, you can contact me here.
Facebook now has an official API for chat bots here.
This API is the only way to automate chat functionalities on a user account. We do this by emulating the browser. This means doing the exact same GET/POST requests and tricking Facebook into thinking we're accessing the website normally. Because we're doing it this way, this API won't work with an auth token but requires the credentials of a Facebook account.
If you just want to use ws3-fca, you should use this command:
npm install ws3-fca@latest
It will download ws3-fca from NPM repositories
const login = require("ws3-fca");
// Create simple echo bot
login({
appState: []
}, {
//setOptions will be here
} (err, api) => {
if (err) return utils.error(err);
api.listenMqtt((err, event) => {
api.sendMessage(event.body, event.threadID);
});
});
Result:
Various types of message can be sent:
body to the desired message as a string.sticker to the desired sticker ID.attachment to a readable stream or an array of readable streams.url to the desired URL.emoji to the desired emoji as a string and set field emojiSize with size of the emoji (small, medium, large)Note that a message can only be a regular message (which can be empty) and optionally one of the following: a sticker, an attachment or a url.
Tip: to find your own ID, you can look inside the cookies. The userID is under the name c_user.
Example (Basic Message)
const login = require("ws3-fca");
login({
appState: []
}, (err, api) => {
if(err) return console.error(err);
var yourID = "000000000000000";
var msg = "Hey!";
api.sendMessage(msg, yourID);
});
Example (File upload)
const login = require("ws3-fca");
login({
appState: []
}, (err, api) => {
if(err) return console.error(err);
// Note this example uploads an image called image.jpg
var yourID = "000000000000000";
var msg = {
body: "Hey!",
attachment: fs.createReadStream(__dirname + '/image.jpg')
}
api.sendMessage(msg, yourID);
});
To avoid logging in every time you should save AppState (cookies etc.) to a file, then you can use it without having password in your scripts.
Example
const fs = require("fs");
const login = require("ws3-fca");
var credentials = {
appState: []
};
login(credentials, (err, api) => {
if(err) return console.error(err);
fs.writeFileSync('appstate.json', JSON.stringify(api.getAppState()));
});
Alternative: Use c3c-fbstate to get fbstate.json (appstate.json)
Listen watches for messages sent in a chat. By default this won't receive events (joining/leaving a chat, title change etc…) but it can be activated with api.setOptions({listenEvents: true}). This will by default ignore messages sent by the current account, you can enable listening to your own messages with api.setOptions({selfListen: true}).
Example
const fs = require("fs");
const login = require("ws3-fca");
// Simple echo bot. It will repeat everything that you say.
// Will stop when you say '/stop'
login({appState: JSON.parse(fs.readFileSync('appstate.json', 'utf8'))}, (err, api) => {
if(err) return console.error(err);
api.setOptions({listenEvents: true});
var stopListening = api.listenMqtt((err, event) => {
if( err) return console.error(err);
api.markAsRead(event.threadID, (err) => {
if(err) console.error(err);
});
switch(event.type) {
case "message":
if(event.body === '/stop') {
api.sendMessage("Goodbye…", event.threadID);
return stopListening();
}
api.sendMessage("TEST BOT: " + event.body, event.threadID);
break;
case "event":
console.log(event);
break;
}
});
});
FAQs
Fca được cập nhật bởi Sleiz
We found that sleizprolayer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.