Using OAuth to access Twitter API
In order to have access to the Twitter API, we will use a token-based authentication system. Twitter applications are required to use OAuth, which is an open standard for authorization. OAuth allow the Twitter users to enter their username and password in order to obtain four strings (token). The token allows the users to connect with the Twitter API without using their username and password. In this chapter, we will use the current version of Twitter REST API 1.1, released on June 11, 2013, which established the use of OAuth authentication as mandatory, for retrieving data from Twitter.
Tip
For more information about token-based authentication systems, please refer to http://bit.ly/bgbmnK.
First, we need to visit https://dev.twitter.com/apps and sign in with our Twitter username and password as is shown in the following screenshot:
Then, we click on the Create a new application button (see the following screenshot) and enter the application details:
Name:
PracticalDataAnalysisBook...