Strvm / meta-ai-api

Llama 3 API (MetaAI Reverse Engineered)
221 stars 41 forks source link

Kept getting error: "FacebookInvalidCredentialsException: Was not able to login to Facebook. You may also have been rate limited. Try to connect to Facebook manually." #23

Open snehitvaddi opened 1 month ago

snehitvaddi commented 1 month ago

I’ve made multiple attempts but continue to receive the error: FacebookInvalidCredentialsException: Unable to login to Facebook. Please verify your credentials. You may have been rate limited. Attempt to connect to Facebook manually.

When I tried to log in manually, it requested email or phone verification.

I think the code needs to be revised to handle this scenario. It should select email verification in the backend and prompt the user to check their email and input the verification code.

jeremyjpj0916 commented 1 month ago

Seems the login functionality is busted:

@Jeremys-Mini workspace % python3 meta_ai.py 
Traceback (most recent call last):
  File "/Users/jeremyjustus/workspace/meta_ai.py", line 2, in <module>
    ai = MetaAI(fb_email="XXXXXX@gmail.com", fb_password="XXXXXX")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/meta_ai_api/main.py", line 50, in __init__
    self.cookies = self.get_cookies()
                   ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/meta_ai_api/main.py", line 335, in get_cookies
    fb_session = get_fb_session(self.fb_email, self.fb_password)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/meta_ai_api/utils.py", line 149, in get_fb_session
    raise FacebookInvalidCredentialsException(
meta_ai_api.exceptions.FacebookInvalidCredentialsException: Was not able to login to Facebook. Please check your credentials. You may also have been rate limited. Try to connect to Facebook manually.

My code just had simple:

from meta_ai_api import MetaAI
ai = MetaAI(fb_email="XXXXXX@gmail.com", fb_password="XXXXXXXX")

And I know I am using right email pass combo.

dubeypreetesh commented 4 weeks ago

I am also facing the same issue. Is anybody came to know about resolution?

Strvm commented 4 weeks ago

Facebook now seems to be requiring a 2FA on each connection, making the connection fail

asad-awadia commented 4 weeks ago

would love to get a workaround for this