Closed jdckl closed 8 years ago
Hi @violetzie ,
I am currently not using anymore so it is a little outdate :(. The dependencies are probably no longer working with FB changes.
Could you try to update facebook-chat-api to 1.0.1 and node-telegram-bot to 0.1.4 ?
This is because, you need to handle correctly how it pull data from config.json. But for a quick fix, why don't you use this :
login({email: "FB_EMAIL", password: "FB_PASSWORD"}, function callback (err, api) {
instead of
login("config.json", function(err, api) {
andddd...you need to update forwardmsg variable.
From this
var forwardmsg = message.sender_name + ": " + message.body;
to this
var forwardmsg = message.senderName + ": " + message.body;
to be able to see sender name and message.
@azizimusa , with this changes you have been able to make FacebookBot work with the last dependancy ?
It work before, but now it won't. Don't know why.
Update : yes it is working on latest dependancy. Only that, after too many login, FB seem blocking my login request, thus returning an error. after 5-6 Hours, I try again, it can login and used like normal.
It seems that even with the changes, I am no longer able to send messages. The logic has probably changed.
@azizimusa @Liryna There were a number of breaking changes in v1.0 of the facebook-chat-api in order to gain some more consistency (and do a better job of abstracting away facebook's own internal inconsistencies). If you need any help updating the bot to the latest version, let me know and I might be able to help.
@azizimusa, if you're doing many logins, you might be able to use the new support for persisting your session cookies between logins. Edit: I see you were the one that opened an issue about this on our repo, I hope you're able to get that cleared up.
@Schmavery , thank you for you help but I had not time to do it. But with @icecube45 pull request #3 this has been made. Thanks all of you !
Created pull request #4 to re impliment the config
When starting the .js the process fails on
info Getting login form data info Logging in... { error: 'Wrong username/password.' } Unhandled rejection TypeError: expecting an array, a promise or a thenable
My creds in the config.json are definitely right. Pity :-/ Really looked forward to trying this out.