Package com.restfb

Klasse FacebookClient.AccessToken

Umschließende Schnittstelle:

public static class FacebookClient.AccessToken extends Object
Represents an access token/expiration date pair.

Facebook returns these types when performing access token-related operations - see FacebookClient.convertSessionKeysToAccessTokens(String, String, String...), FacebookClient.obtainAppAccessToken(String, String), and FacebookClient.obtainExtendedAccessToken(String, String, String) for details.

Mark Allen
  • Konstruktordetails

  • Methodendetails

    • setClient

      public void setClient(FacebookClient client)
    • getClient

    • fromQueryString

      public static FacebookClient.AccessToken fromQueryString(String queryString)
      Given a query string of the form access_token=XXX or access_token=XXX&expires=YYY, return an AccessToken instance.

      The queryString is required to contain an access_token parameter with a non-null value. The expires value is optional and should be the number of seconds since the epoch. If the expires value cannot be parsed, the returned AccessToken will have a null expires value.

      queryString - The Facebook query string out of which to parse an AccessToken instance.
      Gibt zurück:
      An AccessToken instance which corresponds to the given queryString.
      Löst aus:
      IllegalArgumentException - If no access_token parameter is present in the query string.
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • equals

      public boolean equals(Object that)
      Setzt außer Kraft:
      equals in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • getAccessToken

      The access token's value.
      Gibt zurück:
      The access token's value.
    • getExpires

      public Date getExpires()
      The date on which the access token expires.
      Gibt zurück:
      The date on which the access token expires.
    • getTokenType

      public String getTokenType()
      The token type of this access token provided by Facebook
      Gibt zurück:
      the access token type