FBSDKLoginManager logInWithPublishPermissions always returns isCancelled=YES

前端 未结 11 1395

I am having trouble figuring out how to log a user into my app. [FBSDKAccessToken currentAccessToken] is nil, so I am calling:

[[[FBSDKLoginMana         


        
11条回答
  •  不知归路
    2020-12-01 14:32

    FBSDKLoginManagerLoginResult.isCancelled is unexpectedly YES:

    The SDK will report a cancellation if the user explicitly taps a cancel button in the login dialogs, or if they manually app switch back to your app (known as an implicit cancellation). You should make sure you are not initiating a login flow as part of your app delegate's lifecycle (such as starting a login inside application:openURL:sourceApplication:annotation:) as that will mimic an implicit cancellation. If you must, dispatch the login initiation later to the main queue so that the app delegate's lifecycle completes first.

提交回复
热议问题