I have a requirement to integrate facebook login in my iOS app, everything is fine according to the instructions given at the below link https://developers.facebook.com/docs/ios/getting-started
However I have a scenario where I need to implement a conditional redirection for facebook, such as
if (User is Not Logged In)
{
Then redirect to The Installed Facebook application and Get the details of user from the Facebook Application
}
else
{
// If user is logged in
Then Open a Webview to Enter Login
Credentials
}
my problem is due to placing the URL Schemes under URL types in info.plist I can open it in only one manner across the application,
Either I place The facebookId URL schema
as the First Object and open the Installed facebook app, or Place it as second Object to open a Webview
Is there any way possible where I can check if the user is logged in then place the URL Schema at the top and not make it fallback to webview, but if not I Change it to be the first object in URL Types so it open the installed Facebook Application for Login