OAuthMessage message = new OAuthMessage("GET", RequestTokenURL, Collections.<Map.Entry>emptyList());
OAuthConsumer consumer = new OAuthConsumer(callbackURI, consumerKey, consumerSecret, null);
OAuthAccessor accessor = new OAuthAccessor(consumer);
message.addParameter(OAuth.OAUTH_CALLBACK, consumer.callbackURL);
message.addParameter("xoauth_scope", scope);
message.addParameter("xoauth_permission", permission);
message.addRequiredParameters(accessor);
return OAuth.addParameters(message.URL, message.getParameters());
}
private String getAuthorizationURL(String consumerKey, Token requestToken) throws Exception {