Instagram API-如何检索用户在Instagram上关注的人员列表 [英] Instagram API - How can I retrieve the list of people a user is following on Instagram

查看:508
本文介绍了Instagram API-如何检索用户在Instagram上关注的人员列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何才能检索用户在Instagram上关注的人员列表.假定此特定用户是我关注的人.因此,我可以在Instagram应用程序上访问他/她的照片和他的关注者.

如何使用Instagram API执行此操作?这是合法的吗?

解决方案

您可以使用以下Instagram API端点获取用户关注的人员列表.

https://api.instagram.com/v1/users/{user-id}/follows?access_token=ACCESS-TOKEN

这是该端点的完整文档. GET /users/user-id/follows

这是执行该端点的示例响应.

由于此终结点需要一个user-id(而不是user-name),因此取决于您编写API客户端的方式,您可能必须调用 IANAL ,但考虑到它已记录在他们的API中,并查看了使用条款,我不认为这样做是不合法的.

I would like to know how I can retrieve the list of people a user is following on Instagram. This is given that this particular user is someone that I follow. So I have access to his/her photos and his followers on the Instagram app.

How can I use the Instagram API to do this? Is this legal to do?

解决方案

You can use the following Instagram API Endpoint to get a list of people a user is following.

https://api.instagram.com/v1/users/{user-id}/follows?access_token=ACCESS-TOKEN

Here's the complete documentation for that endpoint. GET /users/user-id/follows

And here's a sample response from executing that endpoint.

Since this endpoint required a user-id (and not user-name), depending on how you've written your API client, you might have to make a call to the /users/search endpoint with a username, and then get the user-id from the response and pass it on to the above /users/user-id/follows endpoint to get the list of followers.

IANAL, but considering it's documented in their API, and looking at the terms of use, I don't see how this wouldn't be legal to do.

这篇关于Instagram API-如何检索用户在Instagram上关注的人员列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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