I am trying to Log In a user via Facebook. In the previous version of swift 1.2 everything worked perfectly, but after migration I can't seem to log in via my FB account I am still getting the error saying:
-canOpenURL: failed for URL: "fbauth://authorize/?client_id=... error: "This app is not allowed to query for scheme fbauth"
Can you please help me with that?
I suggest following the instructions from Facebook to prepare an app for iOS 9: https://developers.facebook.com/docs/ios/ios9
Download the appropriate version of the Facebook SDK for your app.
v4.x - Recommended. v3.24.0 - Only if you have not migrated to v4.x of the SDK yet. 2. Whitelist Facebook Servers for Network Requests
If you compile your app with iOS SDK 9.0, you will be affected by App Transport Security. Currently, you will need to whitelist Facebook domains in your app by adding the following to your application's plist:
or you will encounter errors like:
If you use any of the Facebook dialogs (e.g., Login, Share, App Invites, etc.) that can perform an app switch to Facebook apps, you will need to update your application's plist to handle the changes to canOpenURL described in https://developer.apple.com/videos/wwdc/2015/?id=703
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 SDK v4.5 or older:
If you're using FBSDKMessengerShareKit from versions older than the v4.6 release, also add
If you're using v4.6.0 of the SDK, you only need to add:
This will allow the FacebookSDK integration to properly identify installed Facebook apps to perform an app switch. If you are not recompiling with iOS SDK 9.0, your app is limited to 50 distinct schemes (calls to canOpenURL afterwards return NO).