fbchat icon indicating copy to clipboard operation
fbchat copied to clipboard

Cannot login, Facebook detects the API then redirects to checkpoint

Open AJRadaza opened this issue 4 years ago • 3 comments

Can't login anymore due to Facebook detection then redirection at https://m.facebook.com/checkpoint/?_rdr Would appreciate a really quick fix to this :(

Used the example echobot.py

Traceback

Traceback (most recent call last):
  File "testecho.py", line 3, in <module>
    session = fbchat.Session.login("email", "password")
  File "/home/jukiro/.local/lib/python3.7/site-packages/fbchat/_session.py", line 248, in login
    "Login failed at url {!r}".format(r.url), msg, code=code
fbchat.ExternalError: Login failed at url 'https://m.facebook.com/checkpoint/?_rdr': None

Environment information

  • Python 3.7.3
  • fbchat 1.9.6

AJRadaza avatar Feb 16 '20 16:02 AJRadaza

Please see #477, looks like it's mostly the same error, except you're using the version on master, could you try the latest stable version, on the tag v1, or from PyPI?

Additionally, could you try enabling debug logging by putting the below on top of your code:

import logging
logging.basicConfig(level=logging.DEBUG)

And then try again?

madsmtm avatar Feb 19 '20 07:02 madsmtm

I just wanted to make issue related to this. If this happens, i need to comfirm this login on my browser. It says 'firefox on windows' or something. So I comfirm that it was me. Then, when I try to login again, i need to comfirm again, but suddenly from 'chrome on mac os'. Please fix it so it always logs in as same system/browser :c (Should I make it as separate issue?)

TheLastGimbus avatar Feb 21 '20 20:02 TheLastGimbus

I just wanted to make issue related to this. If this happens, i need to comfirm this login on my browser. It says 'firefox on windows' or something. So I comfirm that it was me. Then, when I try to login again, i need to comfirm again, but suddenly from 'chrome on mac os'. Please fix it so it always logs in as same system/browser :c (Should I make it as separate issue?)

If you log in without specifying a user agent, then I believe it uses a random one each time. So to avoid this from happening, just specify the user agent for the type of device you want to use in client = Client('<email>', '<password>', '<user_agent>').

gitCommitWiL avatar Feb 24 '20 01:02 gitCommitWiL