r - twitteR ROAuth handshake error: not generating the PIN option -
this question answers questions related twitter roauth problems:
twitter, roauth , windows: register ok, certificate verify failed
twitter , roauth both worked in pc before. code chunk not generating pin option anymore. pops out following:
twitcred$handshake(cainfo="cacert.pem") error: unauthorized
previously twitcred$handshake(cainfo="cacert.pem") directs to:
to enable connection, please direct web browser to: https://api.twitter.com/oauth/authorize?oauth_token=sevxcpch9rio5ppri8u8____ when complete, record pin given
i tried code in spark rstudio server. code works (generating option enter pin, not generated in pc). code is:
require(twitter) require(roauth) requesturl <- "https://api.twitter.com/oauth/request_token" accessurl <- "https://api.twitter.com/oauth/access_token" authurl <- "https://api.twitter.com/oauth/authorize" consumerkey <- "______________" consumersecret <- "___________________" twitcred <- oauthfactory$new(consumerkey=consumerkey, consumersecret=consumersecret, requesturl=requesturl, accessurl=accessurl, authurl=authurl) setwd("/home/__") download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem") twitcred$handshake(cainfo="cacert.pem") enable connection, please direct web browser to: https://api.twitter.com/oauth/authorize?oauth_token=sevxcpch9rio5ppri8u8____ when complete, record pin given
any appreciated.
twitcred$handshake(cainfo = system.file("curlssl", "cacert.pem", package = "rcurl"))
this worked me.
Comments
Post a Comment