Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

r - TwitteR setup_twitter_oauth() failing

I was following the vignette for the package, updated and loaded all necessary packages, seemed like it would be a pretty straight-forward process to authenticate. Instead, I get an error

> setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)
[1] "Using direct authentication"
Error in check_twitter_oauth() : OAuth authentication error:
This most likely means that you have incorrectly called setup_twitter_oauth()'

My paraphrased and redacted program looks more-or-less like this.

library("twitteR")
download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem") #read this was necessary for Windows machines
consumer_key <- 'abc'
consumer_secret <- 'abc'
access_token <- '123-abc'
access_secret <- 'abc'
setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)

I read a lot of the other SO questions on this topic, nothing solved my issue (most of them used the old authentication process anyway). I'm trying to create a wordcloud following this tutorial.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Just (install and) load the package 'base64enc'.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...