public class OAuth1aService
extends Object
| Constructor and Description |
|---|
OAuth1aService(TwitterCore twitterCore,
TwitterApi api) |
| Modifier and Type | Method and Description |
|---|---|
String |
buildCallbackUrl(TwitterAuthConfig authConfig)
Builds a callback url that is used to receive a request containing the oauth_token and
oauth_verifier parameters.
|
protected TwitterApi |
getApi() |
String |
getAuthorizeUrl(TwitterAuthToken requestToken) |
protected Retrofit |
getRetrofit() |
protected TwitterCore |
getTwitterCore() |
protected String |
getUserAgent() |
static OAuthResponse |
parseAuthResponse(String response) |
void |
requestAccessToken(Callback<OAuthResponse> callback,
TwitterAuthToken requestToken,
String verifier)
Requests a Twitter access token to act on behalf of a user account.
|
void |
requestTempToken(Callback<OAuthResponse> callback)
Requests a temp token to start the Twitter sign-in flow.
|
public OAuth1aService(TwitterCore twitterCore, TwitterApi api)
public void requestTempToken(Callback<OAuthResponse> callback)
callback - The callback interface to invoke when the request completes.public String buildCallbackUrl(TwitterAuthConfig authConfig)
authConfig - The auth configpublic void requestAccessToken(Callback<OAuthResponse> callback, TwitterAuthToken requestToken, String verifier)
callback - The callback interface to invoke when when the request completes.public String getAuthorizeUrl(TwitterAuthToken requestToken)
requestToken - The request token.public static OAuthResponse parseAuthResponse(String response)
OAuthResponse parsed from the
response, may be null if the response does not contain an auth token and secret.protected TwitterCore getTwitterCore()
protected TwitterApi getApi()
protected String getUserAgent()
protected Retrofit getRetrofit()