Open sermijn opened 5 years ago
i'm afraid it's not viable, because fb-chat-api does not work as an app (in facebook's sense), but as your browser opening and viewing the messenger page. so if you can not login into messenger with an app-specific password, then fb-chat-api neither can use it. that's my thought. i tried it. i'd like to have it work and to solve the issue that fb notoriously locks me out (suspectedly due to fb-chat-api).
i'm afraid it's not viable, because fb-chat-api does not work as an app (in facebook's sense), but as your browser opening and viewing the messenger page. so if you can not login into messenger with an app-specific password, then fb-chat-api neither can use it. that's my thought. i tried it. i'd like to have it work and to solve the issue that fb notoriously locks me out (suspectedly due to fb-chat-api).
You can try add markAsRead and sendTypingIndicator so your bot will look more like a normal browser. Also please change the user agent.
@lequanglam is there a reason you think the default user agent should be changed?
@Schmavery oh, because default user agent in this module is public, and Facebook can search for user agent look like default user agent then banning all accounts. I changed the user agent, mark message as read every time the code received a message, use appState, and it works fine for about 1 month now.
Does anyone has an example how to work with app passwords?