With iOS 11 FBSDKLoginManager (v.4.25.0) use SFAuthenticationSession instead of SFSafariViewController, if user cancel Sign In, FBSDKLoginManagerLoginResult always return nil and result.isCancelled code not work:
[[FBSDKLoginManager new] logInWithReadPermissions:@[PERMISSIONS]
fromViewController:self
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
//Error happen
}
else if (result.isCancelled) {
//User cancel
}
else {
//Login success
}
}];
In this case always happen error with description 'com.apple.SafariServices.Authentication Code=1 "(null)"'. So, in this case, we can't discern really error from SFAuthenticationSession error. Any ideas how to handle different errors? Or just need to wait FBSDK update?
I'm using FBSDK version [ 4.17.0 ] with ios 11 and it works fine