Android SDK Version
- Mutable
- CollectionMapper
- AppCall
- CustomTab
- CustomTabUtils
- DialogFeature
- DialogPresenter
- FacebookDialogBase
- FacebookDialogFragment
- GamingAction
- FacebookWebFallbackDialog
- FragmentWrapper
- InstagramCustomTab
- PlatformServiceClient
- WebDialog
- AnalyticsEvents
- AttributionIdentifiers
- BoltsMeasurementEventListener
- BundleJSONConverter
- CallbackManagerImpl
- FacebookInitProvider
- FacebookRequestErrorClassification
- FacebookSignatureValidator
- FeatureManager
- FetchedAppGateKeepersManager
- FetchedAppSettings
- FetchedAppSettingsManager
- FileLruCache
- ImageDownloader
- ImageRequest
- ImageResponse
- ImageResponseCache
- InstallReferrerUtil
- InternalSettings
- LockOnGetVariable
- Logger
- NativeAppCallAttachmentStore
- NativeProtocol
- ServerProtocol
- SmartLoginOption
- UrlRedirectCache
- Utility
- Validate
- WorkQueue
- MessageDialog
- SendButton
- ShareButton
- ShareButtonBase
- GameRequestDialog
- ShareDialog
- MessageDialogFeature
- VideoUploader
- GameRequestValidation
- CameraEffectFeature
- CameraEffectJSONUtility
- LegacyNativeDialogParameters
- NativeDialogParameters
- ResultProcessor
- ShareConstants
- ShareContentValidation
- ShareDialogFeature
- ShareFeedContent
- ShareInternalUtility
- ShareStoryFeature
- WebDialogParameters
- ShareApi
- ShareBuilder
- Sharer
- Share
- ShareToMessengerParamsBuilder
- Messenger
- MessengerThreadParams
- MessengerUtils
- ShareToMessengerParams
- FacebookAppLinkResolver
- AppLinkData
- AppLinks
- AggregateException
- AppLink
- AppLinkResolver
- AppLinks
- CancellationToken
- CancellationTokenRegistration
- CancellationTokenSource
- Continuation
- ExecutorException
- Task
- TaskCompletionSource
- UnobservedTaskException
- AccessTokenTracker
- AuthenticationTokenTracker
- CustomTabActivity
- CustomTabMainActivity
- FacebookActivity
- FacebookAuthorizationException
- FacebookButtonBase
- FacebookCallback
- FacebookDialog
- FacebookDialogException
- LoginStatusCallback
- WebDialog
- AccessToken
- AccessTokenManager
- AccessTokenSource
- AuthenticationToken
- AuthenticationTokenCache
- AuthenticationTokenClaims
- AuthenticationTokenHeader
- AuthenticationTokenManager
- CallbackManager
- CurrentAccessTokenExpirationBroadcastReceiver
- FacebookBroadcastReceiver
- FacebookContentProvider
- FacebookException
- FacebookGraphResponseException
- FacebookOperationCanceledException
- FacebookRequestError
- FacebookSdk
- FacebookSdkNotInitializedException
- FacebookServiceException
- GraphRequest
- GraphRequestAsyncTask
- GraphRequestBatch
- GraphResponse
- HttpMethod
- LoggingBehavior
- Profile
- ProfileCache
- ProfileManager
- ProfileTracker
- ProgressNoopOutputStream
- ProgressOutputStream
- RequestProgress
- Common
- DeviceRequestsHelper
- EndToEndDumper
- CodeChallengeMethod
- CustomTabLoginMethodHandler
- CustomTabPrefetchHelper
- DeviceAuthDialog
- DeviceAuthMethodHandler
- GetTokenLoginMethodHandler
- KatanaProxyLoginMethodHandler
- LoginBehavior
- LoginClient
- LoginConfiguration
- LoginFragment
- LoginManager
- LoginMethodHandler
- LoginResult
- NativeAppLoginMethodHandler
- NonceUtil
- WebLoginMethodHandler
- WebViewLoginMethodHandler
- DefaultAudience
- LoginTargetApp
- DeviceLoginManager
- Login
- AppGroupCreationContent
- CameraEffectArguments
- CameraEffectTextures
- GameRequestContent
- ShareCameraEffectContent
- ShareContent
- ShareHashtag
- ShareLinkContent
- ShareMedia
- ShareMediaContent
- ShareMessengerActionButton
- ShareMessengerURLActionButton
- ShareModel
- ShareModelBuilder
- SharePhoto
- SharePhotoContent
- ShareStoryContent
- ShareVideo
- ShareVideoContent
- AccessTokenAppIdPair
- AppEvent
- AppEventsConstants
- AppEventsLogger
- AppEventsManager
- FlushResult
- InternalAppEventsLogger
- UserDataStore
- MetadataIndexer
- MetadataRule
- SettingsAPIFields
- AppEventsCAPIManager
- CustomEventField
- AppEventType
- AppEventUserAndAppDataField
- ConversionsAPISection
- ConversionsAPICustomEventField
- ConversionsAPIUserAndAppDataField
- ConversionsAPIEventName
- OtherEventConstants
- AppEventsConversionsAPITransformer
- AppEventsConversionsAPITransformerWebRequests
- CodelessLoggingEventListener
- CodelessManager
- RCTCodelessLoggingEventListener
- ViewIndexer
- Constants
- EventBinding
- ParameterComponent
- PathComponent
- SensitiveUserDataUtils
- UnityReflection
- ViewHierarchy
- EventDeactivationManager
- InAppPurchaseActivityLifecycleTracker
- InAppPurchaseAutoLogger
- InAppPurchaseBillingClientWrapper
- InAppPurchaseEventManager
- InAppPurchaseLoggerManager
- InAppPurchaseManager
- InAppPurchaseSkuDetailsWrapper
- InAppPurchaseUtils
- IntegrityManager
- ActivityLifecycleTracker
- AppEventUtility
- AppEventsLoggerUtility
- AutomaticAnalyticsLogger
- Constants
- FileDownloadTask
- ViewHierarchyConstants
- MTensor
- Model
- ModelManager
- Utils
- OnDeviceProcessingManager
- RemoteServiceWrapper
- RestrictiveDataManager
- SuggestedEventsManager
- ViewOnClickListener
- Core
- GateKeeper
- GateKeeperRuntimeCache
- ExceptionAnalyzer
- InstrumentData
- InstrumentManager
- InstrumentUtility
- ANRDetector
- ANRHandler
- CrashHandler
- AutoHandleExceptions
- CrashShieldHandler
- NoAutoExceptionHandling
- ErrorReportData
- ErrorReportHandler
- ThreadCheckHandler
- Excuse
- ExcusesForDesignViolations
- CertificateUtil
- OidcSecurityUtil
- DeviceLoginButton
- LoginButton
- ProfilePictureView
- ToolTipPopup
- All
All Implemented Interfaces:
android.os.Parcelable
public final class AccessToken implements Parcelable
This class represents an immutable access token for using Facebook APIs. It also includes associated metadata such as expiration date and permissions.
For more information on access tokens, see Access Tokens.
Nested Class Summary
Modifier and Type | Class | Description |
---|---|---|
public interface | AccessToken.AccessTokenRefreshCallback | |
public interface | AccessToken.AccessTokenCreationCallback | A callback for creating an access token from a NativeLinkingIntent |
public class | AccessToken.Companion |
Field Summary
Modifier and Type | Field | Description |
---|---|---|
private final Date | expires | |
private final Set<String> | permissions | |
private final Set<String> | declinedPermissions | |
private final Set<String> | expiredPermissions | |
private final String | token | |
private final AccessTokenSource | source | |
private final Date | lastRefresh | |
private final String | applicationId | |
private final String | userId | |
private final Date | dataAccessExpirationTime | |
private final String | graphDomain | |
private final Boolean | isExpired | |
private final Boolean | isDataAccessExpired | |
private final Boolean | isInstagramToken |
Constructor Summary
Constructor | Description |
---|---|
AccessToken(String accessToken, String applicationId, String userId, Collection<String> permissions, Collection<String> declinedPermissions, Collection<String> expiredPermissions, AccessTokenSource accessTokenSource, Date expirationTime, Date lastRefreshTime, Date dataAccessExpirationTime, String graphDomain) | Creates a new AccessToken using the supplied information from a previously-obtained access token (for instance, from an already-cached access token obtained prior to integration with the Facebook SDK). |
AccessToken(String accessToken, String applicationId, String userId, Collection<String> permissions, Collection<String> declinedPermissions, Collection<String> expiredPermissions, AccessTokenSource accessTokenSource, Date expirationTime, Date lastRefreshTime, Date dataAccessExpirationTime) | Creates a new AccessToken using the supplied information from a previously-obtained access token (for instance, from an already-cached access token obtained prior to integration with the Facebook SDK). |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
final Date | getExpires() | Gets the date at which the access token expires. |
final Set<String> | getPermissions() | Gets the list of permissions associated with this access token. |
final Set<String> | getDeclinedPermissions() | Gets the list of permissions declined by the user with this access token. |
final Set<String> | getExpiredPermissions() | Gets the list of permissions that were expired with this access token. |
final String | getToken() | Gets the string representing the access token. |
final AccessTokenSource | getSource() | Gets the AccessTokenSource indicating how this access token was obtained. |
final Date | getLastRefresh() | Gets the date at which the token was last refreshed. |
final String | getApplicationId() | Gets the ID of the Facebook Application associated with this access token. |
final String | getUserId() | Returns the user id for this access token. |
final Date | getDataAccessExpirationTime() | Gets the date at which user data access expires. |
final String | getGraphDomain() | Returns the graph domain for this access token. |
final Boolean | getIsExpired() | |
final Boolean | getIsDataAccessExpired() | |
final Boolean | getIsInstagramToken() | |
String | toString() | |
Boolean | equals(Object other) | |
Integer | hashCode() | |
Integer | describeContents() | |
Unit | writeToParcel(Parcel dest, Integer flags) |
Constructor Detail
AccessToken
AccessToken(String accessToken, String applicationId, String userId, Collection<String> permissions, Collection<String> declinedPermissions, Collection<String> expiredPermissions, AccessTokenSource accessTokenSource, Date expirationTime, Date lastRefreshTime, Date dataAccessExpirationTime, String graphDomain)
Creates a new AccessToken using the supplied information from a previously-obtained access token (for instance, from an already-cached access token obtained prior to integration with the Facebook SDK).
Parameters:
accessToken
- the access token string obtained from FacebookapplicationId
- the ID of the Facebook Application associated with this access tokenuserId
- the id of the userpermissions
- the permissions that were requested when the token was obtained (or when it was last reauthorized); may be null if permission set is unknowndeclinedPermissions
- the permissions that were declined when the token was obtained; may be null if permission set is unknownexpiredPermissions
- the permissions that were expired when the token was obtained; may be null if permission set is unknownaccessTokenSource
- an enum indicating how the token was originally obtained (in most cases, this will be either AccessTokenSource.FACEBOOK_APPLICATION or AccessTokenSource.WEB_VIEW); if null, FACEBOOK_APPLICATION is assumed.expirationTime
- the expiration date associated with the token; if null, an infinite expiration time is assumed (but will become correct when the token is refreshed)lastRefreshTime
- the last time the token was refreshed (or when it was first obtained); if null, the current time is used.dataAccessExpirationTime
- The time when user data access expiresgraphDomain
- The Graph API domain that this token is valid for.AccessToken
AccessToken(String accessToken, String applicationId, String userId, Collection<String> permissions, Collection<String> declinedPermissions, Collection<String> expiredPermissions, AccessTokenSource accessTokenSource, Date expirationTime, Date lastRefreshTime, Date dataAccessExpirationTime)
Creates a new AccessToken using the supplied information from a previously-obtained access token (for instance, from an already-cached access token obtained prior to integration with the Facebook SDK).
Parameters:
accessToken
- the access token string obtained from FacebookapplicationId
- the ID of the Facebook Application associated with this access tokenuserId
- the id of the userpermissions
- the permissions that were requested when the token was obtained (or when it was last reauthorized); may be null if permission set is unknowndeclinedPermissions
- the permissions that were declined when the token was obtained; may be null if permission set is unknownexpiredPermissions
- the permissions that were expired when the token was obtained; may be null if permission set is unknownaccessTokenSource
- an enum indicating how the token was originally obtained (in most cases, this will be either AccessTokenSource.FACEBOOK_APPLICATION or AccessTokenSource.WEB_VIEW); if null, FACEBOOK_APPLICATION is assumed.expirationTime
- the expiration date associated with the token; if null, an infinite expiration time is assumed (but will become correct when the token is refreshed)lastRefreshTime
- the last time the token was refreshed (or when it was first obtained); if null, the current time is used.dataAccessExpirationTime
- The time when user data access expiresMethod Detail
getPermissions
final Set<String> getPermissions()
Gets the list of permissions associated with this access token. Note that the most up-to-date list of permissions is maintained by Facebook, so this list may be outdated if permissions have been added or removed since the time the AccessToken object was created. For more information on permissions, see https://developers.facebook.com/docs/reference/login/#permissions.
getDeclinedPermissions
final Set<String> getDeclinedPermissions()
Gets the list of permissions declined by the user with this access token. It represents the entire set of permissions that have been requested and declined. Note that the most up-to-date list of permissions is maintained by Facebook, so this list may be outdated if permissions have been granted or declined since the last time an AccessToken object was created.
getExpiredPermissions
final Set<String> getExpiredPermissions()
Gets the list of permissions that were expired with this access token.
getSource
final AccessTokenSourcegetSource()
Gets the AccessTokenSource indicating how this access token was obtained.
getLastRefresh
final DategetLastRefresh()
Gets the date at which the token was last refreshed. Since tokens expire, the Facebook SDK will attempt to renew them periodically.
getApplicationId
final StringgetApplicationId()
Gets the ID of the Facebook Application associated with this access token.
getDataAccessExpirationTime
final DategetDataAccessExpirationTime()
Gets the date at which user data access expires.
getIsExpired
final BooleangetIsExpired()
getIsDataAccessExpired
final BooleangetIsDataAccessExpired()
getIsInstagramToken
final BooleangetIsInstagramToken()
describeContents
IntegerdescribeContents()
writeToParcel
UnitwriteToParcel(Parcel dest, Integer flags)