3

我正在尝试获取过去两年(例如 1 月 11 日至 12 月 12 日)包含主题标签(例如 #rstats)的所有推文。但是,使用 searchTwitter 最多只能返回 1500 条。我认为(基于一些阅读)我必须登录才能查询超过 1500 条推文。现在,我在使用 R 的 Mac OS 上(如果存在简单直接的解决方案,我愿意使用 Python)并且无法登录;运行这个

requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "http://api.twitter.com/oauth/access_token"
authURL <- "http://api.twitter.com/oauth/authorize"
twitCred <- OAuthFactory$new(consumerKey = twt.name, consumerSecret = twt.pass, requestURL = requestURL, accessURL = accessURL, authURL = authURL)
twitCred$handshake()

返回:

Error in twitCred$handshake():
Invalid response from site, please check your consumerKey and consumerSecret and try again.

如果有人帮助我完成这项工作,我将不胜感激。谢谢!

4

1 回答 1

1

您是否尝试将所有 https 替换为 http?

你见过这个吗:

为了注册 OAuth,我应该在哪里寻找消费者密钥和秘密?

于 2012-11-21T11:57:49.970 回答