Callback for Android refreshCurrentAccessTokenAsync in Facebook Android SDK 4.1+

前端 未结 2 1483
梦如初夏
梦如初夏 2020-12-22 06:05

In Android, I\'m calling refreshCurrentAccessTokenAsync() but there doesn\'t appear to be a callback. I\'ve registered callbackManager before invoking re

2条回答
  •  情话喂你
    2020-12-22 06:36

    You cannot refresh the token if the user has revoked the token. You can only refresh it if the current access token is still valid.

    The method also calls Graph API directly, which is why there's no onActivityResult being called.

    If there is a successful refresh, then the access token will be updated and you can use the AccessTokenTracker to get notifications.

    Lastly, why are you calling this method directly? Normally just by using the Graph API the SDK will refresh the token automatically for you.

提交回复
热议问题