Swift SDK Version

AccessToken

publicstructAccessToken
Represents an immutable access token used to authenticate with Facebook services.
  • A convenient representation of the authentication token of the current user that is used by other SDK components (like LoginManager or AppEventsLogger).

    Declaration

    Swift
    publicstaticvarcurrent:AccessToken?{getset}
  • Refresh the current access token’s permission state and extend the token’s expiration date, if possible.
    On a successful refresh, the current access token will be updated automatically, so you don’t need to set it again.
    Note
    If a token is already expired, it can’t be refreshed.

    Declaration

    Swift
    publicstaticfuncrefreshCurrentToken(_completion:((AccessToken?,Error?)->Void)?=nil)

    Parameters

    completion
    Optional completion to call when the token was refreshed or failed.