I am using Xcode 7.2, testing on iOS 9.2 and using
pod "FBSDKCoreKit";
pod "FBSDKLoginKit";
pod "FBSDKShareKit";
pod "FBSDKMessengerShareKit";
After login its show error -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)". In OS 7 and 8 it working fine. Please help someone.
if ([FBSDKAccessToken currentAccessToken]) {
// TODO:Token is already available.
[[FBSDKLoginManager new] logOut];
}else{
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
login.loginBehavior=FBSDKLoginBehaviorBrowser;
[login
logInWithReadPermissions: @[@"public_profile"]
fromViewController:self
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
NSLog(@"Process error");
} else if (result.isCancelled) {
NSLog(@"Cancelled");
} else {
NSLog(@"Logged in %@",result);
[self getFacebookProfileInfo];
}
}];
}
After login its open this page only instead of close the screen.