In the Facebook iOS SDK, what does the tryFBAppAuth parameter do in autorizeWithFBAppAuth?
I wanted to use the iOS UI view dialog开发者_如何学Python window for SSO and some answers stated to set both trySafariAuth and tryFBAppAuth to No. "trySafariAuth" is a pretty obvious one, but what does the tryFBAppAuth parameter control and why would I set that to NO?
tryFBAppAuth when set to true is a flag which indicates to try and obtain access token from Facebook application (if installed on the device). This is basically a SSO. trySafariAuth set to NO is enough to have iOS login dialog instead of Safari one.
hope this helps
The tryFBAppAuth == YES will attempt to get the user's login credentials from the Facebook app, if it is installed. A user is usually logged into that app, so it will return that current user's credentials. If that app is not available or otherwise cannot return such credentials, then...
If trySafariAuth == YES then the Safari browser will be called up to prompt the user for login credentials.
Otherwise, if the credentials have not been returned from either method, then a popup dialog will appear that collects the user's login credentials (like apps used to do).
精彩评论