List of usage examples for twitter4j.auth OAuthAuthorization getOAuthRequestToken
@Override public RequestToken getOAuthRequestToken() throws TwitterException
From source file:hashimotonet.UpdateStatus.java
License:Apache License
/** * Twitter?//w w w .ja va 2s .c o m * @throws TwitterException */ private void connectTwitter() throws TwitterException { // Twitetr4j?? Configuration conf = ConfigurationContext.getInstance(); // OauthF?IuWFNg?? OAuthAuthorization Oauth = new OAuthAuthorization(conf); // OauthF?IuWFNgconsumerKeyconsumerSecret? Oauth.setOAuthConsumer(Globals.KEY, Globals.SECRET); // // NGXgg?[N?? RequestToken sRequestToken = null; try { sRequestToken = Oauth.getOAuthRequestToken(); } catch (TwitterException e) { throw new TwitterException(e.toString()); } String url = sRequestToken.getAuthorizationURL(); System.out.println("Url = " + url); }