I use the following code to access facebook
[FBSession openActiveSessionWithAllowLoginUI:TRUE];
NSArray *permissions = [[NSArray alloc] initWithObjects:
@"email",
nil];
[FBSession openActiveSessionWithReadPermissions:permissions allowLoginUI:true
completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
if (error) {
NSLog(@"Failure");
}
else
{
}];
It works great when the user has enabled the facebook account in the iOS settings, and also when the account is not enabled in the iOS settings, it goes into safari for facebook authentication. But suppose the user first turned on the account using abcd@gmail.com , and then after a while added a new account, i.e. efgh@gmail.com. So, how does the application know that the user has changed his account in the iOS settings. How to check this using facebook sdk. Anyone have an idea?
Thanks to everyone.
source
share