Check if an Instagram account is public or private

孤街浪徒 提交于 2019-12-23 11:53:30

问题


I have looked this particular question: Find out whether a user has a public or private profile on instagram using API?, but I don't see a return bool value target_user_is_private as mentioned in the above question. I also don't see any other way to check; none of the endpoints on https://www.instagram.com/developer/endpoints/relationships/ seems to tell me if an account if private or not. Is there any way to check?


回答1:


This endpoint returns target_user_is_private

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

If you are in sandbox mode then you will not get a response with relationship for any user other than your sandbox approved user.

If you are in sandbox mode, add a user to your sandbox, and then use the above API with that user's {user-id}, you will get a response with target_user_is_private



来源:https://stackoverflow.com/questions/38709552/check-if-an-instagram-account-is-public-or-private

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!