List of usage examples for twitter4j TwitterMethod OAUTH_ACCESS_TOKEN
TwitterMethod OAUTH_ACCESS_TOKEN
To view the source code for twitter4j TwitterMethod OAUTH_ACCESS_TOKEN.
Click Source Link
From source file:com.marpies.ane.twitter.data.TwitterAPI.java
License:Apache License
public static void getAccessTokensForPIN(String PIN) { final AsyncTwitter twitter = getAsyncInstance(); twitter.addListener(new TwitterAdapter() { @Override/*from ww w. java2s . c o m*/ public void gotOAuthAccessToken(AccessToken token) { AIR.log("Retrieved access tokens"); /* Store access tokens */ TwitterAPI.storeAccessTokens(token); AIR.dispatchEvent(AIRTwitterEvent.LOGIN_SUCCESS); } @Override public void onException(TwitterException te, TwitterMethod method) { if (method == TwitterMethod.OAUTH_ACCESS_TOKEN) { AIR.dispatchEvent(AIRTwitterEvent.LOGIN_ERROR, StringUtils.removeLineBreaks(te.getMessage())); } } }); twitter.getOAuthAccessTokenAsync(mRequestToken, PIN); }