我正在使用 [ACAccountStore requestAccessToAccountsWithType] 来获取登录 iOs Facebook 设置的用户的 Facebook 用户信息。直到上周它仍然可以正常工作,现在它总是返回错误代码 7。
Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: remote_app_id does not match stored id (404)" UserInfo=0x7fef59d8a760 {NSLocalizedDescription=The Facebook server could not fulfill this access request: remote_app_id does not match stored id (404)}
我不知道为什么会发生这种情况,而且我们没有更改 developer.facebook.com 中的设置。
这是我的代码行。
NSDictionary *options = @{
ACFacebookAppIdKey : [[NSBundle mainBundle] objectForInfoDictionaryKey:@"FacebookAppID"],
ACFacebookPermissionsKey : @[@"email"],
ACFacebookAudienceKey: ACFacebookAudienceFriends
};
ACAccountType *FBaccountType= [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
[self.accountStore requestAccessToAccountsWithType:FBaccountType options:options completion:
^(BOOL granted, NSError *error) {
if (granted) {
} else {
// it always return not granted.
}
}
}];
我不知道为什么现在会发生。
我已经从这个iOS 6 Facebook 发布过程中检查了一些内容,结果是“remote_app_id 与存储的 id 不匹配”,并且在使用 Social Framework 时为 Facebook 获取错误 ACErrorPermissionDenied(错误代码 7),但没有找到任何运气。