The Twitter API

Twitter offers a series of APIs to provide programmatic access to Twitter data, including reading tweets, accessing user profiles, and posting content on behalf of a user.

In order to set up our project to access Twitter data, there are two preliminary steps, as follows:

  • Registering our application
  • Choosing a Twitter API client

The registration step will take a few minutes. Assuming that we are already logged in to our Twitter account, all we need to do is point our browser to the Application Management page at http://apps.twitter.com and create the new app.

Once the app is registered, under the Keys and Access Tokens tab, we can find the information we need to authenticate our application. The Consumer Key and Consumer Secret (also ...

Get Mastering Social Media Mining with Python now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.