-
-
Save chexov/ab18d5d093c1d0f2b608 to your computer and use it in GitHub Desktop.
How to get EchoAuth for twitter4j. Android
This file contains hidden or 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
| String consumerKey = ""; | |
| String consumerSecret = ""; | |
| String token = ""; | |
| String tokenSecret = ""; | |
| Configuration conf = new ConfigurationBuilder().setOAuthConsumerKey(consumerKey).setOAuthConsumerSecret(consumerSecret).setOAuthAccessToken(token).setOAuthAccessTokenSecret(tokenSecret).build(); | |
| OAuthAuthorization auth = new OAuthAuthorization(conf); | |
| HttpRequest hr = new HttpRequest(RequestMethod.GET, "https://api.twitter.com/1.1/account/verify_credentials.json", null, auth, null); | |
| String authorizationHeader = auth.getAuthorizationHeader(hr); | |
| System.out.println(authorizationHeader); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment