Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{ error: 'Wrong username/password.' } #1

Closed
jdckl opened this issue Oct 6, 2015 · 8 comments
Closed

{ error: 'Wrong username/password.' } #1

jdckl opened this issue Oct 6, 2015 · 8 comments

Comments

@jdckl
Copy link

jdckl commented Oct 6, 2015

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

See http://goo.gl/s8MMhc

at apiRejection (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise.js:10:27)
at PromiseArray.init [as _init] (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise_array.js:60:31)
at new PromiseArray (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise_array.js:24:10)
at Function.Promise.all (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise.js:173:12)
at /Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/index.js:233:21
at tryCatcher (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/util.js:26:23)
at ReductionPromiseArray._promiseFulfilled (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/reduce.js:109:18)
at Promise._settlePromiseAt (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise.js:586:26)
at Promise._settlePromises (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/violet/Documents/FacebookBot/node_modules/facebook-chat-api/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:367:17)

My creds in the config.json are definitely right. Pity :-/ Really looked forward to trying this out.

@Liryna
Copy link
Owner

Liryna commented Oct 6, 2015

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 ?

@azizimusa
Copy link

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.

@Liryna
Copy link
Owner

Liryna commented Oct 16, 2015

@azizimusa , with this changes you have been able to make FacebookBot work with the last dependancy ?

@azizimusa
Copy link

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.

@Liryna
Copy link
Owner

Liryna commented Oct 22, 2015

It seems that even with the changes, I am no longer able to send messages.
The logic has probably changed.

@Schmavery
Copy link

@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.

@Liryna
Copy link
Owner

Liryna commented Dec 3, 2015

@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 !

@Liryna Liryna closed this as completed Dec 3, 2015
@icecube45
Copy link
Contributor

Created pull request #4 to re impliment the config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants