Why Instagram API return empty result?

纵然是瞬间 提交于 2019-12-10 15:55:42

问题


1) I'm in Sandbox mode

2) App have a Server-side (Explicit) Flow

3) "Disable implicit OAuth" checkbox active in Manage Clients

4) I have authorized my sandbox user - Instagram API returns data with access_token and user

When i try to retrive some data from Relationship Endpoints Instagram API returns an empty data as this:

{"pagination":{},"meta":{"code":200},"data":[]}

Code:

ACCESS_TOKEN = xxxxx
url = 'https://api.instagram.com/v1/users/self/follows?access_token=%s' % ACCESS_TOKEN
response = requests.get(url)
data = response.text

When i open url in browser - same situation

What's wrong?


回答1:


Only sandbox authorized users will be returned in API response, if u add a user that follows to sandbox users, then that user will be returned in API response, it is limitation of sandbox mode:

https://www.instagram.com/developer/sandbox/

Data is restricted to sandbox users and the 20 most recent media from each sandbox user



来源:https://stackoverflow.com/questions/35111361/why-instagram-api-return-empty-result

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