about how to interact with Twitter using java

Recently a new friend from Facebook told me about how to interact with Twitter using java code. Some time ago i used a great api, twitter4j from Yusuke, for me, a great and very clean developer.

I just have upload the sample to a repository in github, so download it and have some fun. You have to create some credentials to interact with twitter. Use this link and use the button Create new App, provide the necessary to the form and the twitter system will provide you with your credentials.

Captura de pantalla 2015-10-12 a las 16.57.07

Captura de pantalla 2015-10-12 a las 16.59.38

Captura de pantalla 2015-10-12 a las 17.01.05

As you can imagine, you just have to substitute the content of the numbers 1 to 4 in your code. The sample is named

ToGetTweeets.java.

Captura de pantalla 2015-09-28 a las 19.41.15

Have fun!

Alonso

PD

it could be fun if i create a web service using apache cxf and then integrate it with spring integration in order i can ask twitter about the twits from somebody and show them in web browser in real time with web sockets. All i have to do is to use the idea from dublin bus web socket example.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s