简体   繁体   English

某些使用FBLoginView的用户登录时com.facebook.sdk错误2

[英]com.facebook.sdk error 2 on login for some users using FBLoginView

I have been getting the infamous com.facebook.sdk error 2 for some users when trying to login to an app I'm working on. 尝试登录我正在使用的应用程序时,某些用户遇到了臭名昭著的com.facebook.sdk错误2。

  • This error doesn't happen to everyone, only to certain (and what seems to be unrelated users). 并非所有人都会发生此错误,只有某些人(以及似乎无关的用户)才会发生此错误。
  • The app is switched off in their (users who are getting the error) settings->facebook, but switching it ON doesn't solve the problem and the com.facebook.sdk error 2 is still persistent, not allowing login. 该应用已在其(正在获取错误的用户)设置-> facebook中关闭,但将其打开并不能解决问题,并且com.facebook.sdk错误2仍然持续存在,不允许登录。
  • The solution is (as mentioned in some other posts), to go to settings->Facebook-> Delete account. 解决方案是(如在其他一些帖子中所述),转到设置-> Facebook->删除帐户。

This is all the code i have for the FBLoginView 这是我拥有的FBLoginView的所有代码

FBLoginView *loginView = [[FBLoginView alloc] init];
loginView.readPermissions = @[@"public_profile", @"user_friends",@"email"];
loginView.center = CGPointMake(self.view.center.x, self.view.frame.size.height-80);
loginView.delegate = self;
  • When I don't ask for those permission (don't set readPermissions), the login works fine for users that were experiencing errors, but this prohibits users taking advantage of features of the FB framework. 当我不要求这些许可(不设置readPermissions)时,登录对于遇到错误的用户可以正常使用,但是这禁止用户利用FB框架的功能。 From my understanding, these are the 3 basis permissions and should work for everyone without having my app submitted to the FB AppCenter. 据我了解,这是3个基本权限,并且无需将我的应用程序提交给FB AppCenter即可对所有人有效。

My app is live (out of sandbox mode), bundle name, appID match in my project. 我的应用程序处于活动状态(不在沙盒模式下),捆绑名称,appID在我的项目中匹配。 Any idea to what I'm doing wrong, thing I should check to solve this? 对我做错的事情有任何想法,应该检查一下以解决此问题? I have tried almost everything and am feeling quite hopeless already. 我几乎尝试了所有事情,已经感到绝望了。 Thanks for any help and suggestions! 感谢您的帮助和建议!

What seemed to cause the problem was the permission public_profile . 引起问题的似乎是public_profile许可。 Once I removed it, it worked fine. 一旦删除它,它就可以正常工作。 Not sure if this has something to do with the sdk version...but apparently it does. 不知道这是否与sdk版本有关...但是显然可以。 Gluck! l!

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

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