過去 2 年間 (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.
誰かがこれを機能させるのを手伝ってくれたら幸いです。ありがとう!