O'Reilly logo

Learning Play! Framework 2 by Andy Petrella

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interacting with Twitter

In this section, we will update the chatrum application to enable some interaction with Twitter. What we're going to do is search for tweets based on a hashtag and a username. For that, we'll look for items in the chatrum that have special patterns, that is, words starting with a hash (#) or an at sign (@). First of all, we'll see how to use Twitter to retrieve information using a browser and the API specification.

The Twitter REST API provides an entry point from which it will be able to do a lot of search operations. This entry point is the URL http://search.twitter.com/search.json. At first glance we can guess that the operations will represent the response in JSON.

In order to search on a hashtag, this URL can be set ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required