ios - 在ObjectiveC中使用FBSDK框架的FBSDKInternalUtility异常

标签 ios

我正在使用FBSDKCoreKit框架进行自定义登录。我完美地遵循了文档。我正在使用FBSDKLoginManager进行登录。我无法找到为什么出现此异常并获取异常[FBSDKInternalUtility JSONStringForObject:error:]:无法识别的选择器发送到class.please帮助我解决此问题。

这是我的代码:

[FBSDKProfile enableUpdatesOnAccessTokenChange:YES];
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login logInWithReadPermissions:@[@"email",@"public_profile"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
    if (error)
    {

    } else if (result.isCancelled)
    {

    } else
    {
        NSLog(@"%@",result);
        if ([result.grantedPermissions containsObject:@"email"])
        {
            if ([FBSDKAccessToken currentAccessToken])
            {
                [[[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:nil]
                 startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
                     if (!error) {

                         NSLog(@"find result=%@",result);
                     }
                 }];
            }

        }
    }
}];

最佳答案

我认为使用FBSDKShareKit .framework和 FBSDKCoreKit.framework 时遇到类似的问题。
就我而言,我使用的FBSDKCoreKitFBSDKShareKit稍旧。因此,我用FacebookSDK的相同下载替换了它们,并修复了“无法识别的选择器”。

关于ios - 在ObjectiveC中使用FBSDK框架的FBSDKInternalUtility异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30439447/

相关文章:

ios - 如何像SwiftKey一样增加键盘高度?

ios - 未找到 Bitrise.io 方案

ios - UISegmentedControl 重新加载特定页面

ios - 条目字体大小 Xamarin.Forms iOS

iOS - 卡片翻转动画

ios - NSUbiquitousKeyValueStore花费太长时间进行初始同步

ios - 带有自定义 UIEdgeInsets 的 UILabel 在 UITableViewCell 中截断

ios - NS无效参数异常 : App crashes upon opening

ios - UIFont:字体大小不同

ios - 根据 View 高度或屏幕高度设置 NSLayoutConstraint 常量