I am trying to authorize users via facebook. For now I have what I want and I created custom login button with this code after tap:
[FBSession openActiveSessionWithReadPermissions:permissions
allowLoginUI:YES
completionHandler:
^(FBSession *session, FBSessionState state, NSError *error) {
// Call the app delegate's sessionStateChanged:state:error method to handle session state changes
[self sessionStateChangedForLogin:session state:state error:error];
}];
It's okay and it's opening browser on facebook login page and after login I have what I need. But I want to login via facebook app if is installed on device. How can I do that? How to change code to check first for installed app and then open browser? Thanks
You no need to worry . Actually facebook SDK itself first check for the installed Facebook app ,if not available then it will open the browser to enter login credentials.