Package com.restfb

Class AccessToken

    • Method Detail

      • fromQueryString

        public static 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.

        Parameters:
        queryString - The Facebook query string out of which to parse an AccessToken instance.
        Returns:
        An AccessToken instance which corresponds to the given queryString.
        Throws:
        IllegalArgumentException - If no access_token parameter is present in the query string.
        Since:
        1.6.10
      • getAccessToken

        public String getAccessToken()
        The access token's value.
        Returns:
        The access token's value.
      • getExpires

        public Date getExpires()
        The date on which the access token expires.
        Returns:
        The date on which the access token expires.
      • getTokenType

        public String getTokenType()
        The token type of this access token provided by Facebook
        Returns:
        the access token type