我遇到了facebook
通过共享工具包发布文本的问题,当我选择模拟器时,它成功发布在facebook
Twitter 上,但是当我选择它时,我点击登录时要求我登录,当我点击登录时,它会转到页面右上角的 OK 按钮按 OK 按钮,虽然我已经登录,但它再次将我带回登录页面,但我不知道为什么会发生此错误。当我选择它给我例外iphone 6.0
iphone simulator 5.1
facebook
iphone simulator 5.0
2012-12-28 10:35:16.084 SendQuote[431:c07] -[CFXPreferencesSearchListSource tryLock]: unrecognized selector sent to instance 0x80b42f0
2012-12-28 10:35:16.103 SendQuote[431:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CFXPreferencesSearchListSource tryLock]: unrecognized selector sent to instance 0x80b42f0'
*** First throw call stack:
(0x1b69052 0x1426d0a 0x1b6aced 0x1acff00 0x1acfce2 0x79c1770 0xf4aa39 0x1b34885 0x1b347a8 0xe8f1aa 0x59c169 0x5a48bd 0x5a51f8 0x598aa9 0x234bfa9 0x1b3d1c5 0x1aa2022 0x1aa090a 0x1a9fdb4 0x1a9fccb 0x234a879 0x234a93e 0x596a9b 0x2b3a 0x2a45 0x1)
terminate called throwing an exception(lldb)
这是我的 Facebook 分享代码
case 1: // facebook
{
if(NSClassFromString(@"SLComposeViewController"))
{
SLComposeViewController *fbController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
SLComposeViewControllerCompletionHandler __block completionHandler=^(SLComposeViewControllerResult result){
[fbController dismissViewControllerAnimated:YES completion:nil];
switch(result){
case SLComposeViewControllerResultCancelled:
default:
{
NSLog(@"Cancelled.....");
}
break;
case SLComposeViewControllerResultDone:
{
ALERT_VIEW(@"Successfully posted to facebook.");
}
break;
}};
[fbController setInitialText:quotesss];
[fbController setCompletionHandler:completionHandler];
[self presentViewController:fbController animated:YES completion:nil];
}
else
{
DEFacebookComposeViewControllerCompletionHandler completionHandler = ^(DEFacebookComposeViewControllerResult result) {
switch (result) {
case DEFacebookComposeViewControllerResultCancelled:
NSLog(@"Facebook Result: Cancelled");
break;
case DEFacebookComposeViewControllerResultDone:
ALERT_VIEW(@"Successfully posted to facebook.");
break;
}
[self dismissViewControllerAnimated:YES completion:nil];
};
DEFacebookComposeViewController *facebookViewComposer = [[DEFacebookComposeViewController alloc] init];
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[facebookViewComposer setInitialText:quotesss];
facebookViewComposer.completionHandler = completionHandler;
[self presentViewController:facebookViewComposer animated:YES completion:nil];
[facebookViewComposer release];
}
break;
}