/Twitter4jAndTwitterRestApi

Implementation of authentication and junit test the functionalities using twitter4j lib and Twitter Rest Api v 1.1

Primary LanguageJava

Twitter4j or TwitterRestApi

Implementation of authentication with Twitter using OAuth protocol and Junit unit tests of the functionality of twitter.

To view the example of OAuth authentication using the REST API v1.1 or using Twitter4J, look at the classes "AuthTwitterRest.java" or "AuthTwitter4j.java" respectively.

To test the application run the test classes contained in the package test/

Requirements:

  • Maven

2 - To install Maven:

In Eclipse go in -> Help -> Eclipse MarketPlace -> install the "Maven Integration for eclipse WTP".

To correctly import the application just follow the following steps.

1 - Using a Terminal or a Customer Git, do the clone within your workspace.

$ cd ~/workspace/

1.1 - Ctrl+C and Ctrl+Shift+V in terminal:

$ git clone https://github.com/DiegoSousa/Twitter4jAndTwitterRestApi.git

2 - In eclipse go in:

file -> import -> type in the search above "Existing maven projects" -> next -> Browser -> select the project Twitter4jAndTwitterRestApi -> Finish.

3 - Wait until the maven download all libraries.

The End!

Doubts?

Contact diego[at]diegosousa[dot]com or diego.sousa[at]dce.ufpb.br

More Info:
OAuth - https://dev.twitter.com/docs/auth/oauth/faq
Twitter REST API v1.1: https://dev.twitter.com/docs/api/1.1
Twitter4j - http://twitter4j.org/en/index.html
Rules tmplementation OAuth - https://dev.twitter.com/docs/auth/implementing-sign-twitter