问题描述
我在 Instagram API 文档上进行了大量搜索,但找不到确定用户是否拥有公开或受保护个人资料的方法?
I've done a fair bit of searching on the Instagram API docs and can't find a way to determine whether or not a user has a public or protected profile?
这也必须在没有 access_token 的情况下完成.我有一个要使用的 client_id.
This also has to be done without an access_token. I have a client_id to use.
只是为了一些上下文,我只是在构建一个小型练习应用程序,该应用程序读取 PHP 中的用户名 csv,然后调用 API 以确定它是公共的还是私有的.
Just for a bit of context, I'm just building a small practice app which reads a csv of usernames in PHP and then makes a call to the API to determine whether it is public or private.
推荐答案
使用 GET 关系端点.
Use the GET relationship endpoint.
https://api.instagram.com/v1/users/user-id/relationship
此端点返回一个 BOOL 值target_user_is_private".
This endpoint returns a BOOL value "target_user_is_private".
这篇关于使用 API 查明用户在 Instagram 上是否拥有公开或私人资料?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!