In my iphone app redirect to facebook login like facebook app when clicking a button. After login again redirect to my app.
i’m using this code
NSArray *permissions =
[NSArray arrayWithObjects:@"user_photos", @"friends_photos",@"email", nil];
[FBSession openActiveSessionWithReadPermissions:permissions
allowLoginUI:YES
completionHandler:
^(FBSession *session,
FBSessionState state, NSError *error) {
if(!error)
{
NSLog(@" hi im sucessfully lloged in");
}
}];
in your you AppDelegate modify the method
also
But keep in mind that this is not triggered in IOS 6.In ios 6 the following method will be triggered.
If the state of your session changes due to login or disconnect FBsession calls the following method and you should handle your cases.