Book Image

Storm Blueprints: Patterns for Distributed Real-time Computation

Book Image

Storm Blueprints: Patterns for Distributed Real-time Computation

Overview of this book

Table of Contents (17 chapters)
Storm Blueprints: Patterns for Distributed Real-time Computation
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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 a placeholder URL here is fine.

  4. Submit the form. The next page will display the details of the OAuth settings for your application. Note the Consumer key and Consumer secret values since we will need those for our application.

  5. At the bottom of...