[英]Posting text to facebook using ShareKit on ios 5
I'm updating an existing IOS application that uses ShareKit to share to Facebook and Twitter. 我正在更新使用ShareKit分享到Facebook和Twitter的现有IOS应用程序。 I've integrated ShareKit 2.0 and followed all the instructions.
我已经集成了ShareKit 2.0并遵循了所有说明。 I have no problems sharing to Facebook and Twitter under IOS 6.
我在IOS 6下分享到Facebook和Twitter没有任何问题。
On IOS 5 however, Twitter works fine but Facebook does not. 然而,在IOS 5上,Twitter工作正常,但Facebook没有。 This is the behavior I see:
这是我看到的行为:
2013-03-25 15:04:57.570 APPNAME[72699:c07] -[__NSCFDictionary setObject:forKeyedSubscript:]: unrecognized selector sent to instance 0xb468f30
2013-03-25 15:04:57.570 APPNAME [72699:c07] - [__ NSCFDictionary setObject:forKeyedSubscript:]:无法识别的选择器发送到实例0xb468f30
2013-03-25 15:04:57.596 APPNAME[72699:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKeyedSubscript:]: unrecognized selector sent to instance 0xb468f30'
2013-03-25 15:04:57.596 APPNAME [72699:c07] *由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:' - [__ NSCFDictionary setObject:forKeyedSubscript:]:无法识别的选择器发送到实例0xb468f30'
* First throw call stack: *第一次抛出调用堆栈:
(0x6e6022 0x1fbbcd6 0x6e7cbd 0x64ced0 0x64ccb2 0x1e7818 0x1e7396 0x1e2587 0x1c6c00 0x1c6413 0x1dd0aa 0x1db4ad 0x1d7729 0x1e0263 0x1e0999 0x17c6a49 0x17c4e84 0x17c5ea7 0x17c4e3f 0x17c4fc5 0x1709f5a 0x94aa39 0xa17596 0x941120 0xa17117 0x940fbf 0x6ba94f 0x61db43 0x61d424 0x61cd84 0x61cc9b 0x24a87d8 0x24a888a 0xdc3626 0x23b9 0x22f5) terminate called throwing an exception(lldb)
(0x6e6022 0x1fbbcd6 0x6e7cbd 0x64ced0 0x64ccb2 0x1e7818 0x1e7396 0x1e2587 0x1c6c00 0x1c6413 0x1dd0aa 0x1db4ad 0x1d7729 0x1e0263 0x1e0999 0x17c6a49 0x17c4e84 0x17c5ea7 0x17c4e3f 0x17c4fc5 0x1709f5a 0x94aa39 0xa17596 0x941120 0xa17117 0x940fbf 0x6ba94f 0x61db43 0x61d424 0x61cd84 0x61cc9b 0x24a87d8 0x24a888a 0xdc3626 0x23b9 0x22f5)终止叫做抛出异常(LLDB)
I've tried turning on debugging but get no help. 我试过打开调试但没有得到帮助。
Any help would be most appreciated! 非常感激任何的帮助!
Cheers, 干杯,
I have bumped into similar issue to this in the past, and believe it would have to do with the selector not being added until iOS 6, potentially see this stack exchange thread: 我在过去遇到了类似的问题,并且认为它与选择器没有被添加到iOS 6之前,可能会看到这个堆栈交换线程:
dequeueReusableCellWithIdentifier error in my UITableView in iOS5 在iOS5中的UITableView中出现dequeueReusableCellWithIdentifier错误
You need to implement the following in your AppDelegate 您需要在AppDelegate中实现以下内容
-(BOOL) application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
{
NSString* scheme = [url scheme];
if ([scheme hasPrefix:[NSString stringWithFormat:@"fb%@", SHKCONFIG(facebookAppId)]]) {
return [SHKFacebook handleOpenURL:url];
}
return YES;
}
In that case when Safari brings back your app, ShareKit will show dialog to enter share message and you will be able to send it. 在这种情况下,当Safari恢复您的应用程序时,ShareKit将显示对话框以输入共享消息,您将能够发送它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.