I am using the sferik/twitter Ruby gem to send a search with result_type:“recent” through the REST API.
I ran the following searches mere seconds apart.
On my localhost (located in Israel) these are the first tweets I got:
593144984741642240 - 2015-04-28 20:09:19 +0000
593144599469629443 - 2015-04-28 20:07:47 +0000
593144521656967168 - 2015-04-28 20:07:28 +0000
On my production server (located in the US and hosted on AWS) these are the first tweets I got:
592983160289243136 - 2015-04-28 09:26:17 +0000
592982994840788992 - 2015-04-28 09:25:37 +0000
592982951123521537 - 2015-04-28 09:25:27 +0000
Note the time difference.
Since I search backwards in time, my localhost eventually picks up the tweets from 9am, but my production server misses all the tweets after 9am.
The code is identical in both environments:
options = {
result_type: "recent",
lang: 'iw',
count: 100
}
search_results = $twitter_client.search(call_details.query, options).take(100)
fetched_tweets = []
search_results.each do |result|
fetched_tweets << result
end
Any idea why this may happen?