我正在尝试使用 ROAuth (v0.9.2) 对 XING API (api.xing.com) 进行身份验证。
library(package="RCurl")
library(package="ROAuth")
site <- "https://api.xing.com"
requestTokenPath <- "/v1/request_token"
accessTokenPath <- "/v1/access_token"
authorizePath <- "/v1/authorize"
consumerKey <- "***********" # blank key for posting
consumerSecret <- "********" # blank key for posting
requestURL <- paste(site, requestTokenPath, sep="")
accessURL <- paste(site, accessTokenPath, sep="")
authURL <- paste(site, authorizePath, sep="")
credentials <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=requestURL,
accessURL=accessURL,
authURL=authURL,
needsVerifier=TRUE)
credentials$handshake(ssl.verifypeer=FALSE) # skip ssl verification for testing, this is passed through to RCurl
输出:
Error in credentials$handshake(ssl.verifypeer = FALSE) :
Invalid response from site, please check your consumerKey and consumerSecret and try again.
我仔细检查了我的密钥和 URL,所以我很确定这不是错误的原因。
- 谁能告诉我我做错了什么?
- 有没有办法提取服务器请求和响应以进行错误分析?
谢谢,克里斯