-
public class AccessToken.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final StringACCESS_TOKEN_KEYprivate final StringEXPIRES_IN_KEYprivate final StringUSER_ID_KEYprivate final StringDATA_ACCESS_EXPIRATION_TIMEprivate final StringGRAPH_DOMAINprivate final StringDEFAULT_GRAPH_DOMAINpublic final Parcelable.Creator<AccessToken>CREATORpublic final static AccessToken.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final AccessTokengetCurrentAccessToken()Getter for the access token that is current for the application. final UnitsetCurrentAccessToken(AccessToken accessToken)Setter for the access token that is current for the application. final BooleanisCurrentAccessTokenActive()Returns whether the current AccessToken is active or not. final BooleanisDataAccessActive()final BooleanisLoggedInWithInstagram()Indicates whether the current active access token is for an Instagram user. final UnitexpireCurrentAccessToken()Sets the current AccessToken with an expiration time of now. final UnitrefreshCurrentAccessTokenAsync()Updates the current access token with up to date permissions, and extends the expiration date, if extension is possible. final UnitrefreshCurrentAccessTokenAsync(AccessToken.AccessTokenRefreshCallback callback)Updates the current access token with up to date permissions, and extends the expiration date, if extension is possible. final UnitcreateFromNativeLinkingIntent(Intent intent, String applicationId, AccessToken.AccessTokenCreationCallback accessTokenCallback)Creates a new AccessToken using the information contained in an Intent populated by the Facebook application in order to launch a native link. final StringgetACCESS_TOKEN_KEY()final StringgetEXPIRES_IN_KEY()final StringgetUSER_ID_KEY()final StringgetDATA_ACCESS_EXPIRATION_TIME()final StringgetGRAPH_DOMAIN()final StringgetDEFAULT_GRAPH_DOMAIN()final Parcelable.Creator<AccessToken>getCREATOR()-
-
Method Detail
-
getCurrentAccessToken
final AccessToken getCurrentAccessToken()
Getter for the access token that is current for the application.
-
setCurrentAccessToken
final Unit setCurrentAccessToken(AccessToken accessToken)
Setter for the access token that is current for the application.
- Parameters:
accessToken- The access token to set.
-
isCurrentAccessTokenActive
final Boolean isCurrentAccessTokenActive()
Returns whether the current AccessToken is active or not.
-
isDataAccessActive
final Boolean isDataAccessActive()
-
isLoggedInWithInstagram
final Boolean isLoggedInWithInstagram()
Indicates whether the current active access token is for an Instagram user.
-
expireCurrentAccessToken
final Unit expireCurrentAccessToken()
Sets the current AccessToken with an expiration time of now. No action is taken if there is no current AccessToken.
-
refreshCurrentAccessTokenAsync
final Unit refreshCurrentAccessTokenAsync()
Updates the current access token with up to date permissions, and extends the expiration date, if extension is possible.
-
refreshCurrentAccessTokenAsync
final Unit refreshCurrentAccessTokenAsync(AccessToken.AccessTokenRefreshCallback callback)
Updates the current access token with up to date permissions, and extends the expiration date, if extension is possible.
-
createFromNativeLinkingIntent
final Unit createFromNativeLinkingIntent(Intent intent, String applicationId, AccessToken.AccessTokenCreationCallback accessTokenCallback)
Creates a new AccessToken using the information contained in an Intent populated by the Facebook application in order to launch a native link. For more information on native linking, please see https://developers.facebook.com/docs/mobile/android/deep_linking/.
- Parameters:
intent- the Intent that was used to start an Activity; must not be nullapplicationId- the ID of the Facebook Application associated with this access token
-
getACCESS_TOKEN_KEY
final String getACCESS_TOKEN_KEY()
-
getEXPIRES_IN_KEY
final String getEXPIRES_IN_KEY()
-
getUSER_ID_KEY
final String getUSER_ID_KEY()
-
getDATA_ACCESS_EXPIRATION_TIME
final String getDATA_ACCESS_EXPIRATION_TIME()
-
getGRAPH_DOMAIN
final String getGRAPH_DOMAIN()
-
getDEFAULT_GRAPH_DOMAIN
final String getDEFAULT_GRAPH_DOMAIN()
-
getCREATOR
final Parcelable.Creator<AccessToken> getCREATOR()
-
-
-
-