public void getAccessToken() throws OAuthMessageSignerException, OAuthNotAuthorizedException, OAuthExpectationFailedException, OAuthCommunicationException { provider.setOAuth10a(true); provider.retrieveAccessToken(consumer, verifier); this.access_token = consumer.getToken(); this.access_token_secret = consumer.getTokenSecret(); }
private void authorizeUser() { commonsHttpOAuthProvider = new CommonsHttpOAuthProvider( TWITTER_OAUTH_REQUEST_TOKEN_ENDPOINT, TWITTER_OAUTH_ACCESS_TOKEN_ENDPOINT, TWITTER_OAUTH_AUTHORIZE_ENDPOINT); commonsHttpOAuthConsumer = new CommonsHttpOAuthConsumer(Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET); commonsHttpOAuthProvider.setOAuth10a(true); dialog = new TwDialog( this, commonsHttpOAuthProvider, commonsHttpOAuthConsumer, dialogListener, R.drawable.login); dialog.show(); }