Facebook SDK 4.6 login button on iOS doesn't use Facebook app for authentication

前端 未结 3 728
广开言路
广开言路 2020-12-29 09:51

I\'m using the Facebook SDK v4.6.0 for iOS 9 in a simple Swift app to add a login button to my app (I\'ve followed the steps in Preparing Your Apps for iOS 9).

The

相关标签:
3条回答
  • 2020-12-29 09:59

    You need to whitelist the facebook native app. In your info.plist, make sure you have the following entry

    <key>LSApplicationQueriesSchemes</key>
      <array>
        <string>fbapi</string>
        <string>fbapi20130214</string>
        <string>fbapi20130410</string>
        <string>fbapi20130702</string>
        <string>fbapi20131010</string>
        <string>fbapi20131219</string>    
        <string>fbapi20140410</string>
        <string>fbapi20140116</string>
        <string>fbapi20150313</string>
        <string>fbapi20150629</string>
        <string>fbauth</string>
        <string>fbauth2</string>
        <string>fb-messenger-api20140430</string>
      </array>
    

    Unless you whitelist an url scheme, your iOS app won't be able to switch to that app. The facebook SDK will display Safari instead of the native app in that case.

    0 讨论(0)
  • 2020-12-29 10:16

    Are you compiling with iOS9 SDK (XCode 7.x)? As mentioned in FB's iOS9 preparation page you should be compiling with the new SDK for app switching policies to take place.

    0 讨论(0)
  • 2020-12-29 10:17

    This is by design. I have filled a bug report a few days ago and Facebook still has some issue with iOS 9.

    See the Facebook team answer: https://developers.facebook.com/bugs/786729821439894/?search_id

    0 讨论(0)
提交回复
热议问题