fbchat-dev / fbchat

Facebook Chat (Messenger) for Python
https://fbchat.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.19k stars 412 forks source link

Another "cannot login" issue #553

Open asecuesu opened 4 years ago

asecuesu commented 4 years ago

Description of the problem

I am very very new to this but am really keen to access my own FB messenger account to do some basic analysis. I am however getting an error when logging in and even more annoyingly each time FB forces me to change my password to the account.

I have looked at all the other postings here about login issues, tried to replicate what worked for them but with no success.

This is only one example of the codes I used (copied from another thread here) but didn't work

Code to reproduce

# Example code
from fbchat import Client, ThreadType, Message

client = Client()

async def main():
    await client.start("*******", "******")
    print(f"Own ID: {client.uid}")
    await client.send(Message(text="Hi me!"), thread_id=client.uid, thread_type=ThreadType.USER)
    await client.logout()

client.loop.run_until_complete(main())

## Traceback

Traceback (most recent call last): File "", line 1, in File "[site-packages]/fbchat/client.py", line 78, in init self.login(email, password, max_tries) File "[site-packages]/fbchat/client.py", line 407, in login raise FBchatException('Login failed. Check email/password. (Failed on URL: {})'.format(login_url)) fbchat.FBchatException: Login failed. Check email/password. (Failed on URL: https://m.facebook.com/login.php?login_attempt=1)



## Environment information
- Python version : google collab, python 3.x
madsmtm commented 4 years ago

Hmm, looks like you're using fbchat-asyncio, please report issues there.

Though you're right in that the problem affects this library as well!

asecuesu commented 4 years ago

Thank you for your reply. Is there anything that can be done about it ? I see some people have succcess logging in, others less so.