-
Notifications
You must be signed in to change notification settings - Fork 597
Please help me on how to successfully login. #870
Comments
same here |
Hi, Same here. There is an issue with headers location I guess: Around line 168
Here is the console log of res.headers:
Seems to be same as #867 |
you can login. Log in from browser incognito, grab cookies, and replace each in appstate.json. The problem is the new encpass field. The algorithm is in another get response on page load. It's the get response w/
|
@CRAKZOR could you share example appstate.json? I was not able to login, would like to have some template to paste cookies into |
Hi, thanks to your reply!
I can't find appstate file anywhere, nor I do have my own since I was not
able to login.
If you could paste the structure of the appstate file that would help a
lot. Thanks!
pon., 29 mar 2021 o 15:43 CRAKZOR ***@***.***> napisał(a):
… @CRAKZOR <https://github.com/CRAKZOR> could you share example
appstate.json? I was not able to login, would like to have some template to
paste cookies into
Copy AppState contents into an online JSON beautifier and paste it back.
Open chrome/safari incognito and login to Facebook. Inspect element >
storage > cookies. Do a copy and replace in appstate.json for each cookie
contents. I think they're called "datr", "fr", "c_user" ...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#870 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANQNZC4WGAJOZYAGSZTB2DTGB7XBANCNFSM4ZOA2TKQ>
.
--
Adam Cichosz,
tel. 600 915 060
|
Hi, I just got my solution today. Step 1: Login your Facebook account on the browser. Done and worked for me. Hope you can do it too |
What's the structure for the login details ? is it still {email: "FB_EMAIL", password: "FB_PASSWORD"} ? or its different |
You don't need it if you use appstate. |
I got this error when using cookies. ERR! login Error: Cookie not in this host's domain. Cookie:www.facebook.com Request:www.messenger.com |
Ông đổi hết field "name" trong cookie này thành "key" là được nha |
You can logged from appstate. And everytime you have to change your account. You must to change your appstate too |
I just create a video for help. Please turn on your subtitle b/c my English is bad. |
@CongTuHaoHoa : Thank ông nhé. Tôi đổi xong đã login được rồi. |
thanks ô nhé vậy hàm login bằng email với pass word của thư viện bị lỗi rồi |
lỗi lâu rồi. |
@CongTuHaoHoa em login thành công rồi nhưng sau đó vẫn bị báo lỗi :-s bác có biết tại sao không ạ
|
@thangphamnd123 bác cho em xem code được k. Liên lạc em facebook nhé https://www.facebook.com/ngoc.thanh.meomeo |
Mình login ok rồi, tks bác @CongTuHaoHoa đã hỗ trợ nhé. Còn bác bên trên @trungtd-1561 chắc dùng sample này để thử đúng ko // Create simple echo bot
}); Bác thử lại bằng sample này nhé const fs = require("fs"); // Simple echo bot. It will repeat everything that you say.
}); |
@thangphamnd123 mình có thử cách trên rồi nhưng vẫn bị lỗi, phải thay method |
à đúng rồi, listen ko support nữa, phải thay bằng listenMqtt |
Here's a solution that worked for me, based on looking through the package and advice on assorted threads. I'm relatively new to coding in general, so I'll be super detailed in case someone benefits from it or can tell me if I'm off. I did the following: P.S. I think this may have been said already in this thread, but doesn't hurt to consolidate. 1. Backend setup:
ERR: { error: 'Wrong username/password.' } 2. Solution: Credential Workaround: Like someone else mentioned it earlier, you can get the credentials from your facebook page. Here are the steps I took:
3. Avoiding potential error causes: Changing "options"
Code: ERR! listen Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response. 4. Solution: Remove deprecated listen method
5. Avoiding problems caused by future facebook updates (maybe - I'm just speculating)
**FULL CODE: **
// Used to update appState.json to FB's version |
Hiện tại mình thấy khi mình để listen một hồi thì nó không listen nữa như bị diss ra có cách nào khắc phục không các bác |
After successful login i got this error when listening, how can i fix this?
// code
const fs = require("fs");
const login = require("facebook-chat-api");
let options = {
userAgent:
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36",
listenEvents: true,
};
let credentials = {
appState: JSON.parse(fs.readFileSync("fbCookies.json", "utf8")),
};
login(credentials, options, (_err, api) => {
api.listenMqtt((_err, message) => {
if (!_err) {
//code
}
});
}); |
@trangcongloc I think you should set the options after successfully log-in. Or just not to set the userAgent. Worked for me. |
a script using puppeteer to generate appstate.json getAppstate.js |
{ error: 'Wrong username/password.' }
Always prompt after I login , password is correct and also email.
The text was updated successfully, but these errors were encountered: