Created
July 18, 2013 14:24
-
-
Save superalsrk/6029760 to your computer and use it in GitHub Desktop.
twitter4j test appliaton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package OauthTest; | |
import java.util.Properties; | |
import twitter4j.Twitter; | |
import twitter4j.TwitterException; | |
import twitter4j.TwitterFactory; | |
import twitter4j.auth.RequestToken; | |
public class TwitterTest { | |
public static void main(String[] args) throws TwitterException { | |
Properties systemProperties = System.getProperties(); | |
systemProperties.setProperty("http.proxyHost","127.0.0.1"); | |
systemProperties.setProperty("http.proxyPort","8087"); | |
Twitter twitter = TwitterFactory.getSingleton(); | |
twitter.setOAuthConsumer("xPV8uwJ6JlxznoNGISbkTg", "vJBd9Jq75u51WttiMON6V405v4iyCrYUSw4OZMVhHDM"); | |
RequestToken requestToken = twitter.getOAuthRequestToken(); | |
System.out.println(requestToken.getAuthorizationURL()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment