I'm using [ACAccountStore requestAccessToAccountsWithType] to get Facebook users info for users had logged in iOs Facebook settings. It still work fine until last week, now it always return error code 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)}
I do not know why this happen, and we not changing anything in our settings in developers.facebook.com.
This is my code line.
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.
}
}
}];
I don't know why it is happening now.
I have check something from this iOS 6 Facebook posting procedure ends up with "remote_app_id does not match stored id" and this Getting error ACErrorPermissionDenied (error code 7) for Facebook when using Social Framework but not found any luck.
The issue is either of the follows:
there is mismatch between the app_id entered in your xcode project and the app_id you have in developers.facebook.com. Make sure you have setup the plist file properly as pointed out in the Facebook documentation. https://developers.facebook.com/docs/ios/getting-started/#configure
If your app_id matches properly, make sure to enter the app store ID in your settings at developers.facebook.com.