IOS7-[ACAccountStore requestAccessToAccountsWithType-“;错误代码8”;
我已经找到了其他有这个错误的主题,但是大家怎么看,我的NSDictionary还可以-在其他答案中,问题是options参数 我正在使用XCode5并在IOS7上运行IOS7-[ACAccountStore requestAccessToAccountsWithType-“;错误代码8”;,ios,objective-c,acaccountstore,Ios,Objective C,Acaccountstore,我已经找到了其他有这个错误的主题,但是大家怎么看,我的NSDictionary还可以-在其他答案中,问题是options参数 我正在使用XCode5并在IOS7上运行 ACAccountStore *accountStore = [[ACAccountStore alloc] init]; ACAccountType *facebookAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountType
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *facebookAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
NSDictionary *options = @{ACFacebookAppIdKey : @(FACEBOOK_APP_ID),
ACFacebookPermissionsKey : @[@"email", @"publish_stream"],
ACFacebookAudienceKey : ACFacebookAudienceFriends};
[accountStore requestAccessToAccountsWithType:facebookAccountType options:options completion:^(BOOL granted, NSError *error)
{
if (granted)
{
NSArray *accounts = [accountStore accountsWithAccountType:facebookAccountType];
if([accounts count]>0)
callbackSuccess();
} else {
callbackFailure(error);
}
}];
提及的类似主题:
经过长时间的努力,我发现了问题: FACEBOOK\u应用程序\u ID应为NSString 在我宣布它之前
static long long *const FACEBOOK_APP_ID = @"249292141827474";