我刚刚重构了我的代码,这些代码使用社交框架发布到社交网络上(之前的代码使用相同的fmw工作得很好!)。现在我得到的错误信息如下:
[ACAccountStore requestAccessToAccountsWithType:options:completion:]: unrecognized selector sent to instance
我已经记录了帐户存储对象,并且它存在- store is: <ACAccountStore: 0x8c2cec0>
它崩溃的代码:
NSLog(@"[SocialSharingManager sharedInstance].accountStore is:
%@", [SocialSharingManager sharedInstance].accountStore);
ACAccountType * facebookAccountType = [[SocialSharingManager sharedInstance].accountStore
accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
NSDictionary * options = @{ACFacebookAppIdKey : kFacebookAppId, ACFacebookPermissionsKey : permissions, ACFacebookAudienceKey : ACFacebookAudienceEveryone};
[[SocialSharingManager sharedInstance].accountStore
requestAccessToAccountsWithType:facebookAccountType options:options completion:^(BOOL granted, NSError *error) {
if (granted) {...}第二种类型的错误:

当我尝试访问FB或Twitter帐户时,出现这些错误。有什么建议吗?附言-所有的事情都在主线上进行-你可以在屏幕截图上看到它
编辑:不知道为什么图片这么小,所以请使用缩放
发布于 2012-11-29 22:16:35
这并不好笑=)我意外地将方案更改为iPhone模拟器5.0,因此崩溃的原因是显而易见的-社会框架出现在iOS 6.0中。我被弄糊涂了,因为项目编译时没有任何警告。
https://stackoverflow.com/questions/13621408
复制相似问题