Getting error in sendMessage
I am using the code that is provided in the example to of the echo bot
const login = require("facebook-chat-api");
// Create simple echo bot
login({email: "FB_EMAIL", password: "FB_PASSWORD"}, (err, api) => {
if(err) return console.error(err);
api.listen((err, message) => {
api.sendMessage(message.body, message.threadID);
});
});
However each time the code reaches the sendMessage part this happens in the console
ERR! getUserInfo { __ar: 1,
ERR! getUserInfo error: 1357004,
ERR! getUserInfo errorSummary: 'Sorry, something went wrong',
ERR! getUserInfo errorDescription: 'Please try closing and re-opening your browser window.',
ERR! getUserInfo payload: null,
ERR! getUserInfo bootloadable: {},
ERR! getUserInfo ixData: {},
ERR! getUserInfo bxData: {},
ERR! getUserInfo gkxData: {},
ERR! getUserInfo qexData: {},
ERR! getUserInfo lid: '6646712661497263896' }
I am not sure what to make of it, also I am using nodejs version 11.6.0
That was the facebook side error. Try exit the code and run again.
Getting the same error on an old project that used to work. No matter how many times I close and restart it, it never works
That's Facebook doing, I don't think there's much to do since they started blocking accounts using this library. Just don't even bother, you can't solve it on your end.
Damn. So we're forced to use their official API for bot conversations? It can't be used to listen to all message of a conversation AFAIK, doesn't it ?
No it doesn't. It's used to make bot-like services.
I have this issue as well :|
Please read the answers posted before yours
Mmh people seems to be able to use it, and the file handling the sendMessage function has been edited a month ago. Yet I still have the problem. The account still works since I can log into it...