Hello everyone,
I am trying to access twitter data using R on Windows via the following steps:
library(bitops)
library(RCurl)
library(RJSONIO)
library(twitteR)
library(ROAuth)
credential <- OAuthFactory$new(consumerKey="AAAA",
consumerSecret="BBBB",
requestURL="https://api.twitter.com/oauth/request_token",
accessURL="https://api.twitter.com/oauth/access_token",
authURL="https://api.twitter.com/oauth/authorize")
download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem")
credential$handshake(cainfo="cacert.pem")
But every time I get this message:
Error: Authorization Required
What I have done to find a solution:
- I spent countless hours trying almost everything I found on web!
- Created a new App
- Tested my App on my friend laptop and it worked for him!
- Tried to access twitter via Linux (also did not work)
P.s. When I tried to download the “cacert.pem” files, I got the following warning message:
Warning message:
In download.file(url = "http://curl.haxx.se/ca/cacert.pem", destfile = "cacert.pem") :
downloaded length 251894 != reported length 251894
Plz help me