In addition to obtaining social network interaction data, one can collect millions of tweets from Twitter for further text mining tasks. The method for retrieving data from Twitter is very similar to Facebook. For both social platforms, all we need is an access token to access insight data. After we have retrieved the access token, we can then use twitteR
to access millions of tweets.
In this recipe, you need to prepare your environment with R installed and a computer that can access the Internet.
Perform the following steps to read data from Twitter:
First, you need to log in to Twitter and access the page of Twitter Apps at https://apps.twitter.com/. Click on Create New App:
Fill in all required application details to create a new application:
Next, you can select Keys and Access Tokens and then access Application Settings:
Click on...