Facebook SDK iOS错误2 [英] Facebook SDK iOS error 2

查看:238
本文介绍了Facebook SDK iOS错误2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  [FBSession openActiveSessionWithReadPermissions:permissions 
allowLoginUI: YES
completionHandler:^(FBSession * session,FBSessionState state,NSError * error){
[self sessionStateChanged:session state:state error:error];
}]

我遇到的问题是在iOS 6.x中的设备在设置应用程序中有一个没有登录的facebook帐户。它给出的错误是看似一个大小适合的错误2 。这是唯一失败的情况,我不明白为什么。有一个解决方案让我在一个帐户被链接时登录?

解决方案

检查你的权限数组不包含 offline_access 权限。此权限现在是已弃用,并且已知导致登录失败。我以前搜索堆栈溢出,并发现此答案。您还需要进入设置 - > Facebook并将允许的应用程序的权限切换到开启。


I'm trying to log into facebook with their API using

[FBSession openActiveSessionWithReadPermissions:permissions
                                   allowLoginUI:YES
                              completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
                                                     [self sessionStateChanged:session state:state error:error];
                                                 }]

The problem I'm having is in iOS 6.x when the device has a facebook account linked in the settings app it fails to log in. The error it gives is the seemingly one-size-fits-all error 2. This is the only case where it fails and I can't understand why. What is a solution to let me log in while an account is linked?

解决方案

check that your permissions array does not contain the offline_access permission. this permission is now deprecated and has been known to cause login to fail. i previously searched stack overflow and found this answer. you'll also need to go into Settings -> Facebook and switch the permission on the Allowed Apps to On.

这篇关于Facebook SDK iOS错误2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆