Skip to content

Spring-Boot - Connect to Twitter API using oAuth 1.0a (auth header generated purely using Java 8 without 3rd party application) and exposes a REST API to check if a handle follows another handle.

Notifications You must be signed in to change notification settings

smilep/twitter-play

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Twitter Play

Demonstrates connecting to Twitter API using oAuth 1.0a. oAuth 1.0a header generated purely using Java 8 without 3rd party application.

Exposes a REST API to check if a Twitter handle follows another Twitter handle


  • Check TwitterOauthHeaderGenerator to directly see the code to generate oAuth 1.0a Authorization header.

  • Sample code to connect to Twitter API using RestTemplate available here

  • This application also contains a SpringBoot based REST service which checks if a Twitter handle follows another. You can run the application by executing the main method of TwitterPlayApplication and then access the Swagger UI to try out the webservice at http://localhost:8090/swagger-ui.html

Set following environment variables with your API keys before running the application or integration tests.

twitter_oauth_accessToken=<ACCESS_TOKEN>;
twitter_oauth_accessTokenSecret=<ACCESS_TOKEN_SECRET>;
twitter_oauth_consumerKey=<CONSUMER_KEY>;
twitter_oauth_consumerSecret=<CONSUMER_KEY_SECRET>;

API keys can be generated after creating developer account at Twitter


Play around with the application at https://twitter-play.herokuapp.com/swagger-ui.html


Full web app with UI available at https://smilep.github.io/twitter-play-ui/

About

Spring-Boot - Connect to Twitter API using oAuth 1.0a (auth header generated purely using Java 8 without 3rd party application) and exposes a REST API to check if a handle follows another handle.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages