Signing Up for Twitter
Twitter provides a huge amount of data to developers via a free, publically available API. Many Twitter desktop and mobile clients are built on top of this API, but this is also open to developers to use however they want.
If you do not already have a Twitter account, you need one for this hour. You can sign up for an account for free at https://twitter.com/. It takes less than a minute! Once you have a Twitter account, you need to sign into the Twitter Developers website with your details at http://dev.twitter.com/. This site provides documentation and forums for anything to do with the Twitter API. The documentation is thorough, so if you want, you can get a good understanding of what types of data you can request from the API here.
Within the Twitter Developers website, you can also register applications that you create with the Twitter API. You create a Twitter application in this hour, so to register your application, do the following:
- Click the link Create an App.
Pick a name for your application and fill out the form (see Figure 14.1). Application names on Twitter have to be unique, so if you find that the name has already been taken, choose another one.
Figure 14.1. Creating a Twitter application
Once you create your application, you need to generate an access token and an access token secret to gain access to the API from your application.
At the bottom of the Details tab is a Create My Access Token button (see Figure 14.2). Click this button to create an access token and an access token secret.
Figure 14.2. Requesting an access token
- When the page refreshes, you see that values have been added for access token and access token secret (see Figure 14.3). Now you are ready to start using the API!
Figure 14.3. A successful creation of an access token