Попробуйте это.
-(IBAction)CLK_ConnectWithFB:(id)sender
{
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
// If the Facebook app is not installed on the device, falls back to \c FBSDKLoginBehaviorBrowser. This is the default behavior.
login.loginBehavior = FBSDKLoginBehaviorNative;
[login logInWithReadPermissions:@[@"email", @"user_friends",@"user_posts"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error)
{
if (error)
{
// Process error
NSLog(@"error is :%@",error);
}
else if (result.isCancelled)
{
// Handle cancellations
NSLog(@"error is :%@",error);
}
else
{
if ([result.grantedPermissions containsObject:@"email"])
{
[self fetchUserInfo];
[login logOut];
}
}
}];
}
-(void)fetchUserInfo
{
if ([FBSDKAccessToken currentAccessToken])
{
[[[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:@{@"fields": @"id,name,link,first_name, last_name, picture.type(large), email, birthday, bio ,location ,friends ,hometown ,posts, friendlists"}]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (!error)
{
NSLog(@"result is :%@",result);
NSLog(@"friend is :%@",[[result valueForKey:@"friends"]objectForKey:@"data"]);
NSString *photostring=[[[result valueForKey:@"picture"] objectForKey:@"data"] valueForKey:@"url"];
photostring = [photostring stringByReplacingOccurrencesOfString:@"&" withString:@"%26"];
// [self Userlogin:[result valueForKey:@"email"] Username:[result valueForKey:@"name"] PhotoUrl:photostring LoginType:@"fb" Phoneno:@""];
}
}];
}
}
Похоже, это дизайн в iOS9 [Facebook Вход - IOS 9 - Без Safari] (http://stackoverflow.com/questions/32620002/facebook-login-ios-9-without-safari) – user499846