了解用户是否具有使用Instagram的API公共或私人的个人资料? [英] Find out whether a user has a public or private profile on instagram using API?
问题描述
我做的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
这端点返回一个布尔值target_user_is_private。
This endpoint returns a BOOL value "target_user_is_private".
这篇关于了解用户是否具有使用Instagram的API公共或私人的个人资料?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!