Connecting to the Twitter stream

In order to connect to the Twitter API, we must first generate a set of OAuth tokens that will enable our application to authenticate with Twitter. This is done by creating a Twitter application that is associated with your account and then authorizing that application to access your account. If you do not already have a Twitter account, create one now and log in to it. Once you are logged in to Twitter, generate the OAuth tokens by following these steps:

  1. Go to https://dev.twitter.com/apps/new and log in if necessary.
  2. Enter a name and description for your application.
  3. Enter a URL for your application. In our case, the URL is unimportant since we're not creating an app that will be distributed like a mobile app. Entering ...

Get Storm Blueprints: Patterns for Distributed Real-time Computation 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.