[R] Having trouble with twitter API

Erin Hodgess erinm.hodgess at gmail.com
Thu Apr 23 04:21:28 CEST 2015


Hello one more time!

I'm switching over one of my packages from Ubuntu to Windows.

Part of it uses twitter data, as gathered by the twitteR program.

So this is what I have so far:

 library(twitteR)
library(ROAuth)
 requestURL <- "https://api.twitter.com/oauth/request_token"
   accessURL = "https://api.twitter.com/oauth/access_token"
 authURL = "https://api.twitter.com/oauth/authorize"
 library(RCurl)

I got my consumerKey and my consumerSecret from my Twitter developer's
account.

So I have:
Cred <- OAuthFactory$new(consumerKey=consumerKey,
+                              consumerSecret=consumerSecret,
+                           requestURL=requestURL,
+                           authURL=authURL)


Now the next thing is where everything goes wrong.

Cred$handshake(cainfo="cacert.pem")
To enable the connection, please direct your web browser to:
https://api.twitter.com/oauth/authorize?oauth_token=TgGQ1xBifkqusiYyyz34oVKYMcybb0rq
When complete, record the PIN given to you and provide it here: "0172575"
Error in function (type, msg, asError = TRUE)  :
  Could not resolve host: 

Cred$handshake(cainfo="cacert.pem")
To enable the connection, please direct your web browser to:
https://api.twitter.com/oauth/authorize?oauth_token=TgGQ1xBifkqusiYyyz34oVKYMcybb0rq
When complete, record the PIN given to you and provide it here: "0172575"
Error in function (type, msg, asError = TRUE)  :
  Could not resolve host: 


I have done this many times, but to no avail.  Sometimes I leave the quotes
off.  Sometimes I leave a space.  Nothing works.

Has anyone run into this before, please?

This is on R version 3-1.3, Windows 8.

thanks,
Erin




-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com

	[[alternative HTML version deleted]]



More information about the R-help mailing list