facebook login issue - canOpenURL: failed for URL: "fbauth2:///" - error: "(null)" facebook login issue - canOpenURL: failed for URL: "fbauth2:///" - error: "(null)" ios ios

facebook login issue - canOpenURL: failed for URL: "fbauth2:///" - error: "(null)"


I have the same warning, but in Facebook Docs there is an answer.

This is an Xcode warning indicating the the canOpenURL: call returned false. As long as you have configured the LSApplicationQueriesSchemes entry in your plist as described above, you can ignore this warning

https://developers.facebook.com/docs/ios/ios9


The "-canOpenURL: failed for URL" warning is a red herring and simply means the FB app is not installed on the device/simulator you're running on.

It looks like you're requesting an invalid scope (aka permission) of "Public". Can you include your code that includes what permissions you are asking? public_profile is probably what you want (and what the SDK defaults to if none are provided).

More importantly, do NOT add fbauth2 to your CFBundleURLSchemes as that will break login flows. As Himanshu pointed out, those entries should be entered under LSApplicationQueriesSchemes in our plist.


If you're recompiling with iOS SDK 9.0, add the following to your application's plist if you're using a version of the Facebook SDK v4.6.0 or above:

   <key>LSApplicationQueriesSchemes</key>   <array>          <string>fbapi</string>          <string>fb-messenger-api</string>          <string>fbauth2</string>          <string>fbshareextension</string>   </array>

To prepare the facebook integration supported to iOS 9, go through Facebook Integraion for iOS 9 guidelines

To check version of facebook SDK, use below line of code:

   print("SDK version \(FBSDKSettings .sdkVersion())")