我正在尝试获取过去两年(比如 1 月 11 日到 12 月 12 日)所有包含主题标签(比如#rstats)的推文。但是,使用 searchTwitter 最多只能返回 1500。我认为(根据一些阅读)我必须登录才能查询超过 1500 条推文。 现在,我在 Mac 操作系统上使用 R(我愿意使用 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.
如果有人帮助我完成这项工作,我将不胜感激。 谢谢!
最佳答案
您是否尝试将所有 https 替换为 http?
你见过这个吗:
Where should I look for consumers key and secret in order to register OAuth?
关于r - 我怎样才能在给定时间段内获得所有(即 1500 条以上)带有给定主题标签的推文?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13491597/