pavelk2 / social-feed

JavaScript plugin that shows a user feed from the most popular social networks
http://pavelk2.github.io/social-feed-example/
MIT License
960 stars 303 forks source link

Geotagged feed? #110

Closed md409 closed 8 years ago

md409 commented 9 years ago

How would you change the code to incorporate hashtags as well as geotagged media? ie I want all #stanford photos + anything within a 3 mile radius of 37.43, 122.17.

Webarkitekt commented 9 years ago

@md409 @pavelk2 This looks perhaps a bit too specific, plus not every api have the ability to send geographic coords of the user.

pavelk2 commented 9 years ago

@Webarkitekt If we focus specifically on @md409 request, not thinking how this should be implemented in a general version of social-feed, then I would say that we need (based on Instagram as a network supporting location tagging):

search for a specific location:

 https://api.instagram.com/v1/locations/search?distance=3000&lat=37.43&lng=122.17&access_token=ACCESS-TOKEN

search for posts in a given location:

https://api.instagram.com/v1/locations/{location-id}/media/recent?access_token=ACCESS-TOKEN

Then we need to filter out only posts having hash-tags we care about. Check how to filter out response based on hashtags here: http://instagram.com/developer/endpoints/tags/.

Other social-networks could follow similar steps.

pavelk2 commented 8 years ago

I believe that the answer is given. It is not really supported by the plugin in a general way.