-
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_TIMEpublic 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 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 AccessTokencreateFromRefresh(AccessToken current, Bundle bundle)final AccessTokencreateFromLegacyCache(Bundle bundle)final AccessTokencreateFromJSONObject(JSONObject jsonObject)final StringgetACCESS_TOKEN_KEY()final StringgetEXPIRES_IN_KEY()final StringgetUSER_ID_KEY()final StringgetDATA_ACCESS_EXPIRATION_TIME()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()
-
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
-
createFromRefresh
final AccessToken createFromRefresh(AccessToken current, Bundle bundle)
-
createFromLegacyCache
final AccessToken createFromLegacyCache(Bundle bundle)
-
createFromJSONObject
final AccessToken createFromJSONObject(JSONObject jsonObject)
-
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()
-
getCREATOR
final Parcelable.Creator<AccessToken> getCREATOR()
-
-
-
-