To compute important network metrics, follow these steps:
- Load the following packages:
> library(twitteR) > library(igraph)> library(dplyr)
- Set your API keys and secret keys information from the Twitter app and then authenticate using the twitter_oauth method :
> api_key <- <your consumer or api key>> api_secret <- <your api key secret>> access_token <- <your access token>> access_token_secret <- < your access token secret>> setup_twitter_oauth(api_key, api_secret, access_token, access_token_secret)[1] "Using direct authentication"
- Now, we will search Twitter based on the keyword, "demonetization", and convert the tweets to a data frame object. Then we will use only the first 500 tweets for demonstration to avoid heavy ...