FBSDKAccessToken currentAccessToken nil after quitting app

前端 未结 4 1211
轻奢々
轻奢々 2020-12-01 15:35

I am developing an ios app using the Facebook SDK to login. I have set a LogInViewController as the initial View Controller in the Storyboard, from where the us

4条回答
  •  感动是毒
    2020-12-01 16:32

    I spent a nice half-day banging my head against this issue. In spite of making sure all the delegate methods were present, the FBSDKAccessToken.current() always returned nil.

    It turns out that this is because Keychain Sharing is not enabled ( Xcode 8, iOS 10). To fix, go to App -> Capabilities -> Keychain Sharing and turn ON.

    Once this is done, you have to still go through the authorization process and return back to the app. Everything should be fine after.

提交回复
热议问题