简体   繁体   English

无法使用测试用户通过Facebook iOS SDK 3登录

[英]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). 拥有与普通FB用户一起使用的代码(登录和发布)。 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: 在致电https://graph.facebook.com/362652477144946/accounts/test-users吗?...我得到了:

{
  "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. 尝试使用用户名输入“ 100004233554579”,“ Ffaa4FVusNloYGS”和“ iosproject_gaxfjez_iosproject \\ u0040tfbnw.net”,但没有任何效果。 Any ideas? 有任何想法吗?

UPDATE1 Noticed "\@" in email, so changed that to "@". UPDATE1在电子邮件中注意到“ \\ u0040”,因此将其更改为“ @”。 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. UPDATE2注意到登录到Facebook login_url时还有另一封电子邮件“ 100004233554579@facebook.com”,但它也无法正常工作。

I faced the same problem with test facebook user login from mobile device - "we didn't recognize your email address or phone number". 我从移动设备登录测试Facebook用户时遇到了同样的问题-“我们无法识别您的电子邮件地址或电话号码”。

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. 通过开发者控制台更改密码后,Facebook也将更改测试电子邮件。 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. 而且您只能在facebook.com网站(而不是android,iOs或m.facebook.com)上登录-因为您会收到一条安全警告,通知您电子邮件已更改。 Also you can't use simple emails like qwerty. 同样,您不能使用简单的电子邮件,例如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 ) 转到Graph API,生成应用程序令牌,通过{app_id} / accounts / test-users获得测试用户( 详细信息
  • POST new password (only password) to the test user /{user_id} ( details ) 将新密码(仅密码)发布到测试用户/ {user_id}( 详细信息
  • Now you shall be able to login using m.facebook.com, Android or iOS apps 现在您将能够使用m.facebook.com,Android或iOS应用程序登录

A little bit wierd 有点奇怪

From your response, it seems like the email required for login should be iosproject_gaxfjez_iosproject@tfbnw.net . 从您的响应看来,登录所需的电子邮件应该是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. 如果仍然不能解决您的问题,请在http://developers.facebook.com/bugs创建一个错误报告,我们非常乐意进行调查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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