Facebook iOS SDK:presentFeedDialogModallyWithSession崩溃 [英] Facebook iOS SDK: presentFeedDialogModallyWithSession crashes

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

问题描述

使用Facebook iOS SDK 3.7,Xcode 4.6,iOS模拟器6.0。

Using Facebook iOS SDK 3.7, Xcode 4.6, iOS simulator 6.0.

这是我的代码:

NSLog (@"opening session");
[FBSession openActiveSessionWithPublishPermissions: @[@"publish_actions"]
                                   defaultAudience: FBSessionDefaultAudienceFriends
                                      allowLoginUI: YES
                                 completionHandler: nil];
NSLog (@"open active session completed");
if ([FBSession activeSession].isOpen)
{
    NSLog (@"initiating feed dialog");
    [FBWebDialogs presentFeedDialogModallyWithSession: nil
                                           parameters: nil
                                              handler: nil];
}

执行时,会与以下输出一起崩溃到调试控制台:

When executed, it crashes with the following output to the debug console:

opening session
open active session completed
initiating feed dialog
-[FBDialog initWithURL:params:isViewInvisible:frictionlessSettings:delegate:]: unrecognized selector sent to instance 0xb93c7e0

崩溃上面的变化是最简单的。

I tried several variations, they all crash; the variation above is the simplest.

非常感谢任何帮助。

推荐答案

问题是系统中的旧代码(旧版本的ShareKit库)与Facebook SDK冲突。当我删除旧代码时,上述问题中的代码工作正常。

The problem was that legacy code elsewhere in the system (an old version of the ShareKit library) was colliding with the Facebook SDK. When I removed the legacy code, then the code in the question above worked properly.

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

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