The oAuth login point is that this does not happen in your application. It uses fast switching applications for authentication in a reliable environment (Safari or Facebook application).
However, you can change Facebook.m to authenticate in your application, but your credentials will not be remembered. You can see that if your iOS device does not support multitasking, a login dialog appears.
Excerpt from Facebook.m (near line 160):
if ([device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported]) { if (tryFBAppAuth) { NSString *scheme = kFBAppAuthURLScheme; if (_localAppId) { scheme = [scheme stringByAppendingString:@"2"]; } NSString *urlPrefix = [NSString stringWithFormat:@"%@://%@", scheme, kFBAppAuthURLPath]; NSString *fbAppUrl = [FBRequest serializeURL:urlPrefix params:params]; didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]]; } if (trySafariAuth && !didOpenOtherApp) { NSString *nextUrl = [self getOwnBaseUrl]; [params setValue:nextUrl forKey:@"redirect_uri"]; NSString *fbAppUrl = [FBRequest serializeURL:loginDialogURL params:params]; didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]]; } }
If you delete the first conditional code and it contains the code and set didOpenOtherApp to NO, you can get the behavior you are looking for.
source share