As I say in the title, I always hit the rate limit (supposedly) even from the first request. Therefore, I cannot download anything from twitter.
Here is my example code in R:
tweets = searchTwitter('blabla', n=1, cainfo = "cacert.pem")
And I keep getting this message:
[1] "Too Many Requests"
[1] "Rate limited .... blocking for a minute ..."
What could I try?
reqURL <- "http://api.twitter.com/oauth/request_token"
accessURL <- "http://api.twitter.com/oauth/access_token"
authURL <- "http://api.twitter.com/oauth/authorize"
consumerKey <- "KEY"
consumerSecret <- "KEY"
twitCred <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=reqURL,
accessURL=accessURL,
authURL=authURL)
twitCred$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))
registerTwitterOAuth(twitCred)
tweets = searchTwitter('blabla', n=10, cainfo = "cacert.pem")
The code is the above. Without any apparent reason, I managed to download some tweets but sometimes I still keep getting this message.
Moreover, I'm searchong for a string and I cannot find it although I'm 100% sure that it exists on twitter. I'm getting a message that no response was retrieved from the server.