简体   繁体   中英

Can't login via Facebook iOS SDK 3 with a test user

Have a code that is working with ordinary FB user (login and post). Just created test user but unable to login. Getting message "we didn't recognize your email address or phone number". After calling https://graph.facebook.com/362652477144946/accounts/test-users ?... I got:

{
  "id": "100004233554579",
  "access_token": "...",
  "login_url": "https://www.facebook.com/platform/test_account_login.php?user_id=100004233554579&n=Ffaa4FVusNloYGS",
  "email": "iosproject_gaxfjez_iosproject\u0040tfbnw.net",
  "password": "..."
}

Tried entering "100004233554579", "Ffaa4FVusNloYGS" and "iosproject_gaxfjez_iosproject\@tfbnw.net" at username but nothing works. Any ideas?

UPDATE1 Noticed "\@" in email, so changed that to "@". But then getting "We didn't recognize your email" :)

UPDATE2 Noticed there's another email "100004233554579@facebook.com" when logged to Facebook login_url but it doesn't work too.

I faced the same problem with test facebook user login from mobile device - "we didn't recognize your email address or phone number".

What I did:

  • Went to dev console and created new test user
  • Clicked edit and changed password in console - than was a mistake

After you change password via dev console - facebook also changes test email. And you are able to login only at facebook.com website (not android, iOs or m.facebook.com) - because you get a security warning that email was changed. Also you can't use simple emails like qwerty.

What you need to do to get it work:

  • Create new test user in console (do not change anything)
  • Go to Graph API, generate application token, get test users via {app_id}/accounts/test-users ( details )
  • POST new password (only password) to the test user /{user_id} ( details )
  • Now you shall be able to login using m.facebook.com, Android or iOS apps

A little bit wierd

From your response, it seems like the email required for login should be iosproject_gaxfjez_iosproject@tfbnw.net .

That should work for you with the password generated. You can read more about creating test users here .

If it still doesn't solve your issue, please create a bug report at http://developers.facebook.com/bugs and we'll be more than happy to look into it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM