问题
I want to get the list of users who has uploaded (shared) a photo on specific location (page)? the user can type @location_user_name and then share the photo. I want to get the user who share this photo from instagram api using location_user_name! I tried the code below
https://api.instagram.com/v1/users/" + this.instagram_id + "/media/recent?min_timestamp=" + dateString + "&access_token=XXX";
I got the photos uploaded by the location itself not users.
回答1:
As far as I know, Instagram always returns the same data about Photos entity.
I have completed the following request: https://api.instagram.com/v1/users/41864127/media/recent/?client_id=my_client_id
And received the following response:
{
"pagination":
{
...
},
"meta": {
"code": 200
},
"data": [{
...
"user" : {
"username" : "annafaithxoxo",
"website" : "",
"profile_picture" : "https:\/\/igcdn-photos-a-a.akamaihd.net\/hphotos-ak-xaf1\/10748350_344686255703816_1812933634_a.jpg",
"full_name" : "A\u035cn\u0361n\u0361a\u035c F\u0361a\u035ci\u035ct\u0361h\u0361",
"bio" : "",
"id" : "41864127"
}
...
So, there is an information about a user in the end of Instagram Photo data object. I am sure that it should be there in your case too :) If you don't get it from the server then show me your example json response, please.
回答2:
Here is an implementation that does wha you want: http://www.gramfeed.com/instagram/places
You can search for a location, then view all pictures and get the usernames.
It used facebook places API to search for places at a location and then open the photos using the instagram endpoint:
https://api.instagram.com/v1/locations/<location_id>/media/recent?access_token=ACCESS-TOKEN
来源:https://stackoverflow.com/questions/27311761/how-to-get-all-users-who-upload-photo-in-instagram-for-a-specific-location-using