Trying to connect to Twitter Streaming API using ROAuth, getting "Error: Forbidden"
Trying to connect to Twitter Streaming API using ROAuth, getting "Error: Forbidden"
我正在尝试使用 StreamR 获取来自特定位置的推文流。在我这样做之前,我需要使用 ROAuth 进行握手。这是我的工作:
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "http://api.twitter.com/oauth/access_token"
authURL <- "http://api.twitter.com/oauth/authorize"
consumerKey <- "FCVbysnkgqLGAwlkgVTuQA9BJ"
consumerSecret <- "x5wA44qtm5Fj5OD1V1O9qYsWfdgLzQxRfpxqVIpzdEZE7FPJGe"
my_oauth <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=reqURL,
accessURL=accessURL,
authURL=authURL)
my_oauth$handshake()
当 my_oauth$handshake()
执行并复制 PIN 时,我得到 Error: Forbidden
。为什么?
我将 http
s 更改为 https
es 并且有效。
我正在尝试使用 StreamR 获取来自特定位置的推文流。在我这样做之前,我需要使用 ROAuth 进行握手。这是我的工作:
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "http://api.twitter.com/oauth/access_token"
authURL <- "http://api.twitter.com/oauth/authorize"
consumerKey <- "FCVbysnkgqLGAwlkgVTuQA9BJ"
consumerSecret <- "x5wA44qtm5Fj5OD1V1O9qYsWfdgLzQxRfpxqVIpzdEZE7FPJGe"
my_oauth <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=reqURL,
accessURL=accessURL,
authURL=authURL)
my_oauth$handshake()
当 my_oauth$handshake()
执行并复制 PIN 时,我得到 Error: Forbidden
。为什么?
我将 http
s 更改为 https
es 并且有效。