WhatsApp Chat Sentiment Analysis in R

Extract Latest Tweets Using Keywords

Objective: Extract latest tweets about SpiderMan from Twitter world.

Step 1: Install and Load required package


Step 2: Set up and Authorise Twitter OAuth

Get access your API and ACCESS Token by following this LINK.

>api_key <- "YOUR API KEY"
>api_secret <- "YOUR API SECRET"
>access_token <- "YOUR ACCESS TOKEN"
>access_token_secret <- "YOUR TOKEN SECRET"

>setup_twitter_oauth(api_key, api_secret, access_token, access_token_secret)

Step 3: Extract tweets using searchTwitter function



Step 4: Turn tweets into a dataframe

>Tweets_df<- do.call("rbind", lapply(tweets, as.data.frame))


Write to us at info@planetanalytics.in

Instagram Post You May Like: