FB.Mobile.RefreshCurrentAccessToken
Updated: Mar 2, 2018
Copy for LLM
The Facebook SDK will manage the lifetime of access tokens for you and will handle making sure that tokens are refreshed before they expire.
You can use this method to manually refresh the current access token granted to the application by the user in order to retrieve up-to-date permissions, and extend the expiration date, if extension is possible.
Read more at Expiration and Extension of Access Tokens.
Parameters
public static void RefreshCurrentAccessToken (
FacebookDelegate<IAccessTokenRefreshResult> callback = null
)
| Name | Type | Description | Default |
|---|---|---|---|
callback | FacebookDelegate
<IAccessTokenRefreshResult> | A delegate which will receive the result of the method call | null |
Example
FB.Mobile.RefreshCurrentAccessToken(RefreshCallback);
void RefreshCallback(IAccessTokenRefreshResult result) {
if (FB.IsLoggedIn) {
Debug.Log (result.AccessToken.ExpirationTime.ToString());
}
}