这与此问题的其他一些问题相似,但我找不到解决当前问题的方法。我有以下代码:
library(twitteR)
library(ROAuth)
library(RCurl)
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 <- "..."
consumerSecret<-"..."
twitCred <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=requestURL,
accessURL=accessURL,
authURL=authURL)
twitCred$handshake(cainfo="cacert.pem")
registerTwitterOAuth(twitCred)
save(list="twitCred", file="twitteR_credentials")
此代码在R中有效,但它在R studio中不起作用,当我运行第二行时,我仍然得到TRUE,但它不允许我正确使用该包。我做错了什么?