I'm upgrading to the Facebook SDK 4.6 and I'm implementing the new login flow according to the Scruptions example app using this code:
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login logInWithReadPermissions:@[self.requiredPermission]
fromViewController:self
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if ([result.grantedPermissions containsObject:self.requiredPermission]) {
NSLog (@"Sucess!");
} else {
[self dismissViewControllerAnimated:YES completion:NULL];
}
}];
After implementing this the app no longer fast tabs to the Facebook APP installed on the device to ask for the user permissions but rather shows a webpage inside the app where the user can login into Facebook.
Am I using the correct code? Is there a way for me to go into the Facebook APP and have the user confirm the permissions there like in the 3.x SDK, because the user is already logged into the Facebook APP and will surely not login again in my app.