Can somebody tell me about Twitter Search API with geolocation filter?
I’m trying to use
GET https://api.twitter.com/1.1/search/tweets.json?oauth_consumer_key=*************&oauth_token=************-**********************&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1502873578&oauth_nonce=*****&oauth_version=1.0&oauth_signature=%****************%3D&q=ffdp&geocode=45.458626,9.181872999999996,150mi
45.458626,9.181872999999996 – Milan, Italy
And I have no statuses, but if I try this query, using advanced search:
I have some statuses.
Can somebody describe me, please, does it work? Or, maybe there are some mistake in my request?
2
Answers
The link for your advanced search returns tweets that are much older than a week. In general, very few tweets have latitude and longitude embedded with them. Also, the Twitter Search API will only return tweets from the past week or so. For both these reasons you are not seeing any tweets from Milan.
Try setting up your retrieval parameters like this
[“geocode” => “Lon,Lat,Radius”]
for example