In my app, I've implemented FaceBook integration, it works properly when my app is running in the device which doesn't have Facebook App so it directly open up the Facebook login in the Safari web browser but when I run the same in Facebook App installed device it won't open up the Facebook login page? I don't know what is the issue? Please help me.
Here is the code:
if (FBSession.activeSession.accessTokenData.loginType != FBSessionLoginTypeFacebookApplication || FBSession.activeSession.accessTokenData.loginType != FBSessionLoginTypeSystemAccount) { [FBSession openActiveSessionWithReadPermissions:@[@"public_profile", @"email", @"user_friends"] allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState state, NSError *error) { [FBSession setActiveSession:session]; switch (state) { case FBSessionStateOpen:{
[[FBRequest requestForMe] startWithCompletionHandler:^(FBRequestConnection *connection, NSDictionary<FBGraphUser> *user, NSError *error) {
if (error) {
[HUD hide:YES];
NSLog(@"error Report :%@",error);
}
else
{
[FBRequestConnection startWithGraphPath:@"me/feed"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error)
{
}];
break;
}
case FBSessionStateClosed:{
}
case FBSessionStateClosedLoginFailed:{
}
break;
}
default:
break;
}
} ];
}
else{
}
*