我无法使用R完成Twitter访问....我正在使用R studio ....我的代码如下....
rm(list=ls(all=TRUE))
library(httr)
library(base64enc)
#library(ROAuth)
library(twitteR)
#set_config(use_proxy(url='10.32.192.30',8080))
#download.file(url="http://curl.haxx.se/ca/cacert.pem",destfile="cacert.pem")
api_key<-"aveDy5RnM*****LmmgJ08TmsJ"
api_secret<-"BmbnOO06LKS********UDaoohYGgv4L1kp5RguYKERA3K7UDAR"
access_token<-"43281661-FcRyQOJo*********GZLl8TD732yTtsRSqddISm25"
access_token_secret<-"BNV7gIsLYA0********j5epXDXRI8IYgAANWw4N1JT7Ug"
x<-setup_twitter_oauth(api_key,api_secret,access_token,access_token_secret)
我收到错误
Error in check_twitter_oauth() : OAuth authentication error:
This most likely means that you have incorrectly called setup_twitter_oauth()'
答案 0 :(得分:0)
library(twitteR)
consumer_key = "your consumer_key"
consumer_secret = "your consumer_secret"
access_token = "your access_token"
access_secret = "your access_secret"
setup_twitter_oauth(consumer_key,consumer_secret,access_token,access_secret)
#[1] "Using direct authentication"
#Use a local file to cache OAuth access credentials between R sessions?
#1: Yes
#2: No
#Selection: 1
尝试使用此代码,它应该可以正常工作。
答案 1 :(得分:0)
我发现问题是我的电脑....我没有管理员权限.... !!将它放入具有管理员权限的电脑解决了问题