AccessToken
这个类有新版本。查看 最新版本。

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)
参数描述
tokenThe access token string obtained from AccountKit
accountIdThe AccountKit account id associated with this access token
applicationIdThe ID of the Facebook Application associated with this access token
tokenRefreshIntervalInSecondsThe interval at which tokens should be refreshed
lastRefreshTimeThe 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()
Returns
The account ID
getApplicationId()

Gets the ID of the Facebook Application associated with this access token.

public String getApplicationId()
Returns
The application ID
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()
Returns
The date at which this token was last refreshed
getToken()

Gets the string representing the access token.

public String getToken()
Returns
The string representing the access token
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()
Returns
The token refresh interval seconds
describeContents()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

public int describeContents()
Returns
A bitmask indicating the set of special object types marshalled by the Parcelable.
describeContents()
public int describeContents()
writeToParcel(Parcel, int)

Flatten this object in to a Parcel.

public void writeToParcel(Parcel dest, int flags)
参数描述
destThe Parcel in which the object should be written.
flagsAdditional 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