Instagram API:检索喜欢用户发布的Instagram图像的朋友的ID/名称 [英] Instagram API: Retrieve IDs/names of friends who have liked the user's posted Instagram images

查看:53
本文介绍了Instagram API:检索喜欢用户发布的Instagram图像的朋友的ID/名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在构建一个应用程序,用户可以使用Instagram API登录该应用程序,接受权限对话框,并根据他们允许我们阅读的各种数据接收个性化的动态故事".

We’re building an application where a user logs with Instagram API, accepts the permissions dialog and receives a personalised ‘dynamic story’ based on various data they allow us to read.

我们希望显示用户的顶级朋友",他们喜欢用户发布到其Instagram feed上的图像.我们有什么办法可以做到这一点?

We’re hoping to display the user’s ‘top friends’ who have liked images that the user has posted onto their Instagram feed. Is there any way we could go about doing this?

非常感谢,

马特

推荐答案

使用此API获取所有关注者:

Use this API to get all your followers:

https://api.instagram.com/v1/users/self/followed-by?access_token=ACCESS-TOKEN

将此API用于您的所有帖子:

Use this API to all your posts:

https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN

要从上述API调用中获取media_id,可以使用此API来获取喜欢媒体的用户列表:

For media_id's you get from the above API call, you can use this API to get the list users who have liked a media:

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

比较喜欢者列表和关注者列表,找到喜欢媒体的关注者列表.

Compare the list of liker and list of followers to find the list of followers who have liked the media.

请注意,Instagram仅在API响应中提供最新的120个喜欢的人,因此,如果您的照片获得超过120个喜欢的人,您可能将无法有效地获取所需的数据.

Note that Instagram only give the latest 120 likers in the API response, so if you photo gets more that 120 likes, you may not be able to efficiently get the data you want.

您还需要 basic public_content API权限才能从API获得响应

You also need basic and public_content API permissions to get the response from the APIs

这篇关于Instagram API:检索喜欢用户发布的Instagram图像的朋友的ID/名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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