Enough Hello Worlds, let's fetch tweets!

All right, the name of the book isn't "Mastering Hello Worlds", after all. With Spring, interrogating Twitter's API is really easy.

Registering your application

Before you start, you have to register your application in the Twitter developer console.

Go to https://apps.twitter.com and create a new application.

Give it the name you please. Under the website and Callback URL sections, just enter http://127.0.0.1:8080. This will allow you to test your application in development on your local machine.

Registering your application

Now, navigate to the keys, access the token, and copy the Consumer Key and the Consumer Secret. We will use this in ...

Get Spring MVC: Designing Real-World Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.