パッケージ twitter4j
クラス OAuthAuthorization
java.lang.Object
twitter4j.OAuthAuthorization
- すべての実装されたインタフェース:
Serializable,Authorization
- 関連項目:
-
ネストされたクラスの概要
ネストされたクラス -
メソッドの概要
修飾子とタイプメソッド説明static StringencodeParameters(List<twitter4j.HttpParameter> httpParams) booleangetAuthorizationHeader(twitter4j.HttpRequest req) static OAuthAuthorizationEquivalent to OAuthAuthorization.newBuilder().build();static OAuthAuthorizationgetInstance(String consumerKey, String consumerSecret) Equivalent to OAuthAuthorization.newBuilder().oAuthConsumer(key, secret).build();Returns an access token associated with this instance.
If no access token is associated with this instance, this will retrieve a new access token.getOAuthAccessToken(String oauthVerifier) Retrieves an access token.getOAuthAccessToken(RequestToken requestToken) Retrieves an access token associated with the supplied request token and sets userId.getOAuthAccessToken(RequestToken requestToken, String oauthVerifier) Retrieves an access token associated with the supplied request token and sets userId.Retrieves a request tokengetOAuthRequestToken(String callbackURL) Retrieves a request tokeninthashCode()voidInvalidates the OAuth tokenbooleanReturns true if authorization credentials are set.toString()
-
メソッドの詳細
-
newBuilder
- 戻り値:
- builder for
OAuthAuthorization
-
getInstance
Equivalent to OAuthAuthorization.newBuilder().oAuthConsumer(key, secret).build();- パラメータ:
consumerKey- consumer keyconsumerSecret- consumer secret- 戻り値:
- OAuthAuthorization
-
getInstance
Equivalent to OAuthAuthorization.newBuilder().build();- 戻り値:
- OAuthAuthorization
-
getAuthorizationHeader
- 定義:
getAuthorizationHeaderインタフェース内Authorization- パラメータ:
req- request- 戻り値:
- header
-
isEnabled
public boolean isEnabled()Returns true if authorization credentials are set.- 定義:
isEnabledインタフェース内Authorization- 戻り値:
- true if authorization credentials are set
-
getOAuthRequestToken
Retrieves a request token- 戻り値:
- generated request token.
- 例外:
TwitterException- when Twitter service or network is unavailableIllegalStateException- access token is already available- 導入されたバージョン:
- Twitter4J 2.0.0
- 関連項目:
-
getOAuthRequestToken
Retrieves a request token- パラメータ:
callbackURL- callback URL- 戻り値:
- generated request token
- 例外:
TwitterException- when Twitter service or network is unavailableIllegalStateException- access token is already available- 導入されたバージョン:
- Twitter4J 2.0.0
- 関連項目:
-
getOAuthAccessToken
Returns an access token associated with this instance.
If no access token is associated with this instance, this will retrieve a new access token.- 戻り値:
- access token
- 例外:
TwitterException- when Twitter service or network is unavailable, or the user has not authorizedIllegalStateException- when RequestToken has never been acquired- 導入されたバージョン:
- Twitter4J 2.0.0
- 関連項目:
-
getOAuthAccessToken
Retrieves an access token.- パラメータ:
oauthVerifier- OAuth verifier. AKA pin.- 戻り値:
- access token
- 例外:
TwitterException- when Twitter service or network is unavailable, or the user has not authorized- 導入されたバージョン:
- Twitter4J 2.0.0
- 関連項目:
-
getOAuthAccessToken
Retrieves an access token associated with the supplied request token and sets userId.- パラメータ:
requestToken- the request token- 戻り値:
- access token associated with the supplied request token.
- 例外:
TwitterException- when Twitter service or network is unavailable, or the user has not authorized- 導入されたバージョン:
- Twitter4J 2.0.0
- 関連項目:
-
getOAuthAccessToken
public AccessToken getOAuthAccessToken(RequestToken requestToken, String oauthVerifier) throws TwitterException Retrieves an access token associated with the supplied request token and sets userId.- パラメータ:
requestToken- the request tokenoauthVerifier- OAuth verifier. AKA pin.- 戻り値:
- access token associated with the supplied request token.
- 例外:
TwitterException- when Twitter service or network is unavailable, or the user has not authorized- 導入されたバージョン:
- Twitter 2.1.1
- 関連項目:
-
invalidateOAuthToken
Invalidates the OAuth tokenOn success, sets oauthToken to null
- 例外:
TwitterException- when Twitter service or network is unavailable, or the user has not authorized
-
encodeParameters
- パラメータ:
httpParams- parameters to be encoded and concatenated- 戻り値:
- encoded string
- 関連項目:
-
equals
-
hashCode
public int hashCode() -
toString
-