What is the expected behaviour of Facebook login? - ios

I want to know what the expected behaviour of Facebook login integrated in an iPhone app is, when a user is already logged into Facebook on the device through Facebook app, and the app is granted the required permissions in the previous login. I want to know if the app exits and starts again, should it still switch to Facebook app/website to check the permissions or should it silently log the user in without getting out of the app? Currently, my app switches to Facebook, detects that the user has already granted access, asks for an Ok or Cancel and comes back to the app. I wan to know if this behaviour is expected, because it seems it's doing nothing but unnecessary switching. I have asked this question in another form and I have included my code. Here's the link: http://bit.ly/1E1u2VI
Thank you!

It silently log the user in without getting out of the app. For that you can check the current user's permissions.
This might help you:
Controlling Login dialogs
The Facebook SDK automatically selects the optimal login dialog flow based on the account settings and capabilities of a person's device. This is the default sequence that the Facebook SDK implements:
Facebook App Native Login Dialog
Facebook App Web Login Dialog
Mobile Safari Login Dialog
If the Facebook account is not set up, the Facebook SDK checks to see if the Facebook app is installed on the device. If the Facebook app is installed, the Facebook app native login dialog is presented if it's supported. If the Facebook app native login dialog can't be displayed because there's an old version of the app, the Facebook app web login dialog is presented. If the Facebook app isn't installed, mobile Safari is launched to display the Mobile Safari login dialog.
Here are the screenshots of code

I have checked the login process using safari browser it's work for me. [FBSDKAccessToken currentAccessToken] is working fine. I am attaching some screenshots might help you.

Related

Is the Facebook login process fundamentally different for iOS vs. Android?

I'm an Android programmer and I hired someone to write an iOS version of a Facebook app I wrote. A dispute came up regarding the login process on both platforms. In the Android app, when I log in to the app the first time, I see a screen from Facebook prompting me to continue, but after the first time, I don't see the screen; I just go directly to the app. He claims that under iOS, we can never bypass the Continue screen: it always displays. In his words,
"Tip: In order to clear the login token totally you need to logout from Facebook in safari browser as well since we can't clear that token of safari browser programmatically. it is not permitted on iOS."
Is this true?
EDIT: Here's what my developer replied:
"I didn't explicitly set the login behavior. it should be selected as default value."
and
"The Facebook SDK automatically selects the optimal login dialog flow based on the account settings and capabilities of a person's device. This is the default sequence that the Facebook SDK implements:
Facebook App Native Login Dialog
Facebook App Web Login Dialog
Mobile Safari Login Dialog
If the Facebook account is not set up, the Facebook SDK checks to see if the Facebook app is installed on the device. If the Facebook app is installed, the Facebook app native login dialog is presented if it's supported. If the Facebook app native login dialog can't be displayed because there's an old version of the app, the Facebook app web login dialog is presented. If the Facebook app isn't installed, mobile Safari is launched to display the Mobile Safari login dialog." I'm not clear on how all this is relevant to the issue, though.

One time login through Facebook in iOS app

I have a app which has a login option which is only through the Facebook account. But when I run the app in simulator it always ask for login again and again when I am going to run my app. I want to show the main view if user is already logged in through the Facebook and when user delete the app and install again then user has to log in again to the app.
You should be saving a single sign on token? The simulator will fallback to 0Auth and may not be realistic, but it should remember it none the less.
Which version of the FaceBook SDK are you using?

Redirecting user to iOS facebook app for authentication instead of browser window

I'm fairly new to iOS Development and trying to use Facebook SDK for authentication for my app. I have done the integrations and whenever I click on the Login with Facebook button it opens a browser window in the app for authentication. How do I redirect the user to the inbuilt Facebook app which the user uses instead of a browser window if facebook is installed on the phone.
In iOS9 it is not possible switch with Facebook netive app .. For that you should try out other older version of Facebook sdk.
Please check below link.
https://developers.facebook.com/bugs/786729821439894/?search_id
Hope this will help you.
Link for Facebook sdk try it.
https://developers.facebook.com/resources/FacebookSDKs-iOS-20150708.pkg

How to avoid "App is allready authorized" with Facebook SDK 3.1

Every time i want to login through the Facebook idk, safari will be opened and tells me that my app is allready authorized. But i dont want to show this screen everytime a user logs in with Facebook. I followed the instructions over here to implement facebook login functionality. If the auth button is clicked i simple call the openSessionWithAllowLoginMethod which then handles the rest for me. But i dont how to apply the functionality, that it wont show the authorized screen everytime, to this code ? I would really appreciate some tips or hints.
Fill out every field related to your app in the Native iOS App section of the Basic Settings in the App Dashboard. If these fields are not configured, we can't drive traffic to your app or the iOS App Store. In addition, we use the iOS Bundle ID to streamline authentication for users who already authenticated your app. Pro-tip 3: Complete all iOS App Settings

facebook dialog ios for login

I have followed the example of Facebook SDK for iOS (Hackbook) and it works well however whenever the person is logging in the app takes take the person to Safari or the Facebook app (if you have it installed on the device). Is there a way I can call the permission without leaving the app.
Thanks
there once was. But facebooks says that you should use SSO (single sign on) with the official facebook app. So even if you'd modify the files of the facebook-ios-sdk, it would probably not work.

Resources