I’m using the ROAuth and streamR libraries for R.
First I had trouble connecting to Twitter, see http://stackoverflow.com/questions/40362950/trying-to-connect-to-twitter-streaming-api-using-roauth-getting-error-forbidd/40363285#40363285. Then I’ve been trying to get a stream filtered to show 10 tweets mentioning “Jeremy Corbyn”; this is how I did it:
filterStream( file.name="jeremy_corbyn.json",
track='"jeremy corbyn"', tweets=10, oauth=my_oauth )
tweets.df <- parseTweets("jeremy_corbyn.json")
At first when I tried running this, it waited for about 200 seconds. I don’t remember running the second command that time. After that, every time I’ve run it I’ve got back
Capturing tweets…
Connection to Twitter stream was closed after 1 seconds with up to 1 tweets downloaded.
and
Error in parseTweets(“jeremy_corbyn.json”) :
“jeremy_corbyn.json” did not contain any tweets. See ?parseTweets for more details.
I’ve even tried waiting 15 minutes and I get the same thing.
The contents of “jeremy_corbyn.json” are:
Exceeded connection limit for user
Exceeded connection limit for user
Exceeded connection limit for user
Exceeded connection limit for user
Why is this happening and how do I get it to work?