iOS 9 没有登录 Facebook 登录?

标签 ios objective-c facebook

我正在使用 Xcode 7.0,在 iOS 9.0.2 上进行测试并使用 Facebook SDK 4.7.0。 Code=308 "(null)" 问题出现在 iOS 9 中。我在我的项目中使用 objective-c 代码。如何解决这个问题? 下面附上我的代码。

FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];

 [login logInWithReadPermissions:@[@"public_profile",@"email", @"user_friends"] fromViewController:self handler:^(FBSDKLoginManagerLoginResult *result, NSError *error){

    if ([FBSDKAccessToken currentAccessToken]) { startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {

             if (!error) {
             }

         }];

    }
}];

最佳答案

iOS9.2.1

这解决了我的 308 问题

以“源代码”形式打开 plist 文件,搜索 LSApplicationQueriesSchemes,然后根据需要添加/修改。

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbauth2</string>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbshareextension</string>
</array>

关于iOS 9 没有登录 Facebook 登录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33367944/

相关文章:

ios - 将对象转换为 json

facebook - 从 Facebook Javascript SDK session 对象中提取用户 ID

ios - 具有核心数据的主从应用程序

ios - 下载数据后如何在 UIcollectionview 中插入项目

ios - 如何在 iPhone 上创建多个窗口/ View ?

Objective-C extern 和 typedef undefined symbol

iphone - 设置UIActivityIndi​​catorView的框架

iphone - 如何解决在类型为 "AppDelegate"的对象上找不到属性数组错误

facebook - 如何使用图形 API 获取共享计数

ios - 来自 ParseSDK 的 PFFacebookUtils 抛出 PFUserAuthenticationController authenticationProviderForAuthType