Facebook login shows an additional confirmation popup on iOS 11

后端 未结 3 2196
一向
一向 2020-12-16 01:31

I have implemented login through facebook using facebook SDK for swift. It works as expected on iOS 10.3, but on iOS 11 it shows and additional popup that asks the user to a

3条回答
  •  半阙折子戏
    2020-12-16 02:12

    This is related to the iOS 11.x update, Facebook SDK 0.3.0 is using SFAuthenticationSession which result in an Alert to give explicit consent, allowing the application to access the website's data in Safari.

    Tried this on iOS 10.x, no Alert!

    If you want to get rid of the popup, you should downgrade the Facebook SDK to 0.2.0 , and since the Facebook swift SDK still depends on the Objective C SDK you should force downgrading these ones as well to the version 4.22.1

    Before Downgrade:

    pod 'FacebookCore', '~> 0.3.0'
    pod 'FacebookLogin', '~> 0.3.0'
    pod 'FacebookShare', '~> 0.3.0'
    

    After Downgrade:

    pod 'FacebookCore', '~> 0.2.0'
    pod 'FacebookLogin', '~> 0.2.0'
    pod 'FacebookShare', '~> 0.2.0'
    pod 'FBSDKCoreKit', '~> 4.22.1'
    pod 'FBSDKLoginKit', '~> 4.22.1'
    pod 'FBSDKShareKit', '~> 4.22.1'
    

提交回复
热议问题