为什么Instagram API返回空结果? [英] Why Instagram API return empty result?
问题描述
1)我处于沙盒模式
2)应用具有服务器端(显式)流程
2) App have a Server-side (Explicit) Flow
3)在管理客户端中处于活动状态的禁用隐式OAuth"复选框
3) "Disable implicit OAuth" checkbox active in Manage Clients
4)我已授权我的沙盒用户-Instagram API返回带有access_token和用户的数据
4) I have authorized my sandbox user - Instagram API returns data with access_token and user
当我尝试从Relationship Endpoints检索某些数据时,Instagram API会返回一个空数据,如下所示:
When i try to retrive some data from Relationship Endpoints Instagram API returns an empty data as this:
{"pagination":{},"meta":{"code":200},"data":[]}
代码:
ACCESS_TOKEN = xxxxx
url = 'https://api.instagram.com/v1/users/self/follows?access_token=%s' % ACCESS_TOKEN
response = requests.get(url)
data = response.text
当我在浏览器中打开url时-同样的情况
When i open url in browser - same situation
怎么了?
推荐答案
API响应中将仅返回沙盒授权用户,如果您将跟随用户的用户添加到沙盒用户中,则该用户将在API响应中返回,是沙箱模式的限制:
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/
数据仅限沙盒用户和来自以下位置的20种最新媒体 每个沙盒用户
Data is restricted to sandbox users and the 20 most recent media from each sandbox user
这篇关于为什么Instagram API返回空结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!