This class represents an immutable access token for using AccountKit APIs. It also includes associated metadata such as expiration date.
الإضافات: | Object |
عمليات التنفيذ: | Parcelable |
الحزمة: | accountkit |
AccessToken(String, String, String, long, Date)
Creates a new AccessToken using the supplied information. Note that the caller is asserting that all parameters provided are correct with respect to the access token string; no validation is done to verify they are correct.
public AccessToken(String token, String accountId, String applicationId, long tokenRefreshIntervalInSeconds, Date lastRefreshTime)
المعلمة | الوصف |
---|---|
token | The access token string obtained from AccountKit |
accountId | The AccountKit account id associated with this access token |
applicationId | The ID of the Facebook Application associated with this access token |
tokenRefreshIntervalInSeconds | The interval at which tokens should be refreshed |
lastRefreshTime | The last time the token was refreshed (or when it was first obtained); if null, the current time is used. |
getAccountId()
Gets the account ID associated with the given access token
public String getAccountId()
getApplicationId()
Gets the ID of the Facebook Application associated with this access token.
public String getApplicationId()
getLastRefresh()
Gets the date at which the token was last refreshed. Since tokens expire, the AccountKit SDK will attempt to renew them periodically.
public Date getLastRefresh()
getToken()
Gets the string representing the access token.
public String getToken()
getTokenRefreshIntervalSeconds()
Gets the token refresh interval in seconds
You should make an Account Kit graph call using this token at least this often to keep the token from expiring
public long getTokenRefreshIntervalSeconds()
describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
public int describeContents()
describeContents()
public int describeContents()
writeToParcel(Parcel, int)
Flatten this object in to a Parcel.
public void writeToParcel(Parcel dest, int flags)
المعلمة | الوصف |
---|---|
dest | The Parcel in which the object should be written. |
flags | Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. |
writeToParcel(Parcel, int)
public void writeToParcel(Parcel dest, int flags)
المعلمة | الوصف |
---|---|
dest | |
flags |
CREATOR
public static final Creator CREATOR