Reputation: 2461
I have added facebook sdk for accessing the user account. But when user is already login in facebook via iOS 6 facebook then in my app on the very first page it must shows the alert that app is asking for profile permissions. For it I have added following code in app delegate
[FBSession openActiveSessionWithAllowLoginUI:true];
NSArray *permissions = [NSArray arrayWithObjects:
@"friends_about_me",nil];
[FBSession openActiveSessionWithReadPermissions:permissions allowLoginUI:true
completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
if (error) {
NSLog(@"Failure");
}
}];
return YES;
}
-(BOOL)application:(UIApplication *)application openURL:(NSURL )url sourceApplication: (NSString) sourceApplication annotation:(id)annotation { return [FBSession.activeSession handleOpenURL:url]; }
I am getting the alert properly.
But when I click on OK button it gives me following error
FBSDKLog: System authorization failed:'The Facebook server could not fulfill this access request: remote_app_id does not match stored id '. This may be caused by a mismatch between the bundle identifier and your app configuration on the server at developers.facebook.com/apps.
But in my fb developer account , everything is fine. Please help me in resolving this issue.
Thanks!
Upvotes: 2
Views: 2868
Reputation: 705
I Faced the same issue when i run my project in 3.5 inch simulator it shows the same error. It works fine in 4 inch simulator. I fixed this issue by going to my 3.5 inch simulator settings then i logged out from my Facebook account. then i re run the project it worked.
Upvotes: 0
Reputation: 1395
Dear Sudha may be your bundle id is not confirmed yet from all server of facebook. You have to wait for it.
Upvotes: 4
Reputation: 2246
Are you sure you have the same bundle ID set in your Facebook app settings? A good way to validate is to use this code to print the bundle ID to the console and compare it with your app settings on Facebook:
NSLog(@"Bundle ID: %@",[[NSBundle mainBundle] bundleIdentifier]);
Upvotes: 9