this is my first time posting here. I'm trying to make a simple chatbot as a beginner project using fbchat but I can not get it to work. On facebook, I am getting notifications of successful logins to my account, but fbchat is failing. I have logged in from a browser on my computer to the facebook account I am using with the same ip, so facebook should not be blocking my log in attempts. Any help is appreciated.
Here is my python code:
from fbchat import Clientemail = 'email'password = 'password'client = Client(email, password)if client.isLoggedIn(): print("Logged in successfully!")else: print("Login failed!")
Here is the console printout:
Attempt #1 failed, retryingTraceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/fbchat/_client.py", line 205, in login self._state = State.login( ^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/fbchat/_state.py", line 151, in login return cls.from_session(session=session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/fbchat/_state.py", line 190, in from_session revision = int(r.text.split('"client_revision":', 1)[1].split(",", 1)[0]) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^IndexError: list index out of range
It keeps trying for 3 more tries with the same results.