问题
Can I display the on-image (tooltip type) tags created by users through the IG api on images? The basic tags/{tag-name} isn't the answer for specific on image tags.
回答1:
Yes you can. The API returns users_in_photos
in json response for any media that has user tags, it has user details and position of tagged location in photo:
"users_in_photo": [{
"user": {
"username": "kevin",
"full_name": "Kevin S",
"id": "3",
"profile_picture": "..."
},
"position": {
"x": 0.315,
"y": 0.9111
}
}],
multiply the position.x and position.y by the width of image you are displaying, that is the pixel offset of tagged location on the photo. create a tooltip css and display the username there, here is example: http://gramfeed.com/instagram/900635430205440533_55431
来源:https://stackoverflow.com/questions/28698519/displaying-on-image-instagram-tags