Using just credentials with the facebook-chat-api seem to have stopped working at some point, throwing the following error into the PM2 error-logs
- info login Logging in...
- ERR! login Wrong username/password.
- { error: 'Wrong username/password.' }
|
login( |
|
{ |
|
email: process.env.EMAIL, |
|
password: process.env.PASSWORD, |
|
}, |
A workaround is exporting the cookies when logged in(only the table of the cookie), and reading that
const fs = require('fs');
const credentials = { appState : JSON.parse(fs.readFileSync('appstate.json', 'utf8')) };
(In the above example, appstate.json containing)
[{"domain":".facebook.com","expirationDate":...
and passing that to login
login(credentials,
(err, api) =>
facebook-chat-api seem to have been deprecated, with a new API existing for chatbots by facebook, would be cool if this supported that instead, or at least updated to work with the suggested workaround.
Using just credentials with the
facebook-chat-apiseem to have stopped working at some point, throwing the following error into the PM2 error-logsgit-messenger-webhook/webhook.js
Lines 30 to 34 in 69551d2
A workaround is exporting the cookies when logged in(only the table of the cookie), and reading that
(In the above example,
appstate.jsoncontaining)[{"domain":".facebook.com","expirationDate":...and passing that to login
facebook-chat-api seem to have been deprecated, with a new API existing for chatbots by facebook, would be cool if this supported that instead, or at least updated to work with the suggested workaround.