Reputation: 1902
I'm using the new Twitter API 1.1 to fetch trending Hashtags in a given location using the woeid:
/trends/place.json?id=3534
Then I can use the same API to fetch tweets with a given Hashtag:
/search/tweets.json?q=Hashtag&result_type=latest
But I can't find in the doc how to fetch tweets with a given Hashtag in a given location, if someone could suggest something, it would be great.
Upvotes: 0
Views: 1299
Reputation: 79
This is from the Twitter API and may help you...
Geolocalization: The search operator “near” isn’t available in API, but there is a more precise way to restrict your query by a given location using the geocode parameter specified with the template “latitude,longitude,radius”, for example, “37.781157,-122.398720,1mi”. When conducting geo searches, the search API will first attempt to find tweets which have lat/long within the queried geocode, and in case of not having success, it will attempt to find tweets created by users whose profile location can be reverse geocoded into a lat/long within the queried geocode, meaning that is possible to receive tweets which do not include lat/long information.
Here is an example to find tweets mentioning #olympics
near Portland, OR. Bear in mind it won't work without authentication & authorization.
https://api.twitter.com/1.1/search/tweets.json?geocode=45.51,-122.67,100km&rpp=50&q=%23olympics&callback=processResult
Upvotes: 1