3
votes

In iOS getting this error while i am integrating facebook sdk in my application "FBSDKLog: Cannot use the Facebook app or Safari to authorize, fb394371460678795 is not registered as a URL Scheme" how to open facebook login page as a seperate app in ios.

1
Did you register the url scheme in plist? - Anil Varghese
i registered url scheme in plist.but still the login page is not opening as a seperate app. - SwathiK
Did you register as shown in the figure in my answer? what you are getting a web view? - Anil Varghese

1 Answers

17
votes

To login with facebook through an iOS app three options are available

  1. If native facebook app is available you will be directed to the app (You need to register url scheme)

  2. If Safari can launch, you will be directed to the login page of facebook through safari ((You need to register url scheme))

  3. If the two options are not available (You are getting this error) you will be provided with a web view there you can login

Your error message shows the first two options are not available in your case, probably you may forgot to register for the url scheme

enter image description here

Update

In FacebookSDK 3.9 they have added one more login flow(iOS Login Dialog) gets the higher priority. As per SDK 3.9 from documentations.

1.iOS Login Dialog
2.Facebook App Native Login Dialog
3.Facebook App Web Login Dialog
4.Mobile Safari Login Dialog

If the person has set up their Facebook account on the device, then that login dialog option is selected. 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 native login dialog can't be displayed, the Facebook app mobile login dialog is presented. If the Facebook app isn't installed, mobile Safari is launched to display the login dialog.