[GIS] How to return geo-tagged social media posts

apigeotagtwitterweb service

I have seen quite a few ESRI web apps that utilize Geo-Tagged social media posts as a point data layer. I'm wondering how one goes about querying things like Twitter, Flickr and YouTube to return posts related to a specific location. I'm also hoping to be able to filter these results based on hash-tags. Twitter is my main interest, but I know when I get that working I'll have people clamoring for the others.

My hope is to add this to our public web viewer where citizens view pictures, videos and tweets about our public lands.

Also, are these Geo-Tagged posts limited by your own personal followers / friends?

Here is an ESRI example of what I am looking for: ESRI Australia Wildfires Map

Best Answer

You'll need to tap into the api's for twitter, flickr and youtube.

twitter api: https://dev.twitter.com/docs/api/1.1

Discussion specific to twitter here (from 2010): https://stackoverflow.com/questions/4337319/how-to-search-only-for-geotagged-tweets

Looking at the docs for twitter, you have to issue a get request to the api that includes a search location and search radius:

Geocode (optional) 
Returns tweets by users located within a given radius of the given latitude/longitude. 
The location is preferentially taking from the Geotagging API, but will fall back to 
their Twitter profile. The parameter value is specified by "latitude,longitude,radius", 
where radius units must be specified as either "mi" (miles) or "km" (kilometers).
Note that you cannot use the near operator via the API to geocode arbitrary locations; 
however you can use this geocode parameter to search near geocodes directly. 
A maximum of 1,000 distinct "sub-regions" will be considered when using the radius 
modifier.

Example Values: 37.781157,-122.398720,1mi 

You can explore the twitter api using the console here.

See also

flickr api: http://www.flickr.com/services/api/

and similar question (from 2012): https://stackoverflow.com/questions/8988167/how-do-i-retrieve-all-public-geotagged-photos-from-flickr

youtube api: https://developers.google.com/youtube/