0

I am attempting to set up a tweet sentiment analysis tool in R, however I keep getting errors in relation to 0Auth not completing it's handshake.

it's using a tutorial that I found online, however I'm new to R and coding in general so I'm stumped.

Any light that can be shed on this would be much appreciated:

install.packages("twitteR")
install.packages("plyr")
install.packages("stringr")
install.packages("ggplot2")
install.packages("streamR")

library(twitteR)
library(ROAuth)
library(plyr)
library(stringr)
library(ggplot2)

## Windows users need to get this file
download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem")

requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL = "https://api.twitter.com/oauth/access_token"
authURL = "https://api.twitter.com/oauth/authorize"
consumerKey = "conkey code"
consumerSecret = "consec code"

Cred <- OAuthFactory$new(consumerKey=consumerKey,
                         consumerSecret=consumerSecret,
                         requestURL=requestURL,
                         accessURL=accessURL, 
                         authURL=authURL)
Cred$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl") )
1340490

load("twitter authentication.Rdata")
registerTwitterOAuth(Cred)
Zaku212
  • 13
  • 4
  • This has been asked many times. See http://stackoverflow.com/search?q=%5Br%5D+OAuth+handshake+failed+in+R – Andrie Sep 10 '14 at 15:25
  • Possible duplicat of http://stackoverflow.com/questions/15347233/ssl-certificate-failed-for-twitter-in-r or http://stackoverflow.com/questions/9916283/twitter-roauth-and-windows-register-ok-but-certificate-verify-failed or http://stackoverflow.com/questions/8122879/roauth-on-windows-using-r – Andrie Sep 10 '14 at 15:27
  • I've tried many of those solutions, most of which are before the implementation of an updated version of the twitter API, So afaik none of them work the same. – Zaku212 Sep 10 '14 at 17:31

1 Answers1

0

Have you tried looking at the creators github page:(https://github.com/geoffjentry/twitteR/blob/master/README.md) It's an easier way to do it. You will also need to install Rtools if you are going to do it this way. Here is a youtube link that shows you how to install Rtools(https://www.youtube.com/watch?v=enPPMHr5SrM) it is in Chinese but you can still follow what this guy is doing. I hope this helps.

Zaynaib Giwa
  • 5,366
  • 7
  • 21
  • 26