显示图像上的instagram标签 [英] Displaying on-image instagram tags

查看:139
本文介绍了显示图像上的instagram标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在图像上显示用户通过IG api创建的图像上(工具提示类型)标签吗?基本标签/{tag-name}并不是特定于图像标签的答案.

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.

推荐答案

可以.对于具有用户标签的任何媒体,API都会在json响应中返回users_in_photos,它具有用户详细信息以及照片中带标签的位置的位置:

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
    }
}],

将position.x和position.y乘以您正在显示的图像的宽度,即照片上标记位置的像素偏移量.创建工具提示CSS并在其中显示用户名,例如: http://gramfeed.com/instagram/900635430205440533_55431

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

这篇关于显示图像上的instagram标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆