Creating a Twitter API connection
We need to have an app created at https://dev.twitter.com/apps before making any API requests to Twitter. It's a standard method for developers to gain API access, and, more importantly, it helps Twitter to observe and restricts developer from making high load API requests.
The ROAuth
package is the one we are going to use in our experiments. Recall that in Chapter 1, Fundamentals of Mining, we discussed a lot about the OAuth
protocol to for obtaining tokens. These tokens allow users to authorize third-party apps to access the data from any user account without the need to have their passwords (or other sensitive information). ROAuth
basically facilitates the same thing.
Creating a new app
The first step toward getting any kind of token access from Twitter is to create an app on it. You have to go to https://dev.twitter.com/ and log in with your Twitter credentials. Having logged in using your credentials, the step for creating an app are as follows:
- Go...