新 Instagram API:/tags/TAGNAME/media/recent 上的空数据
New Instagram API: empty data on /tags/TAGNAME/media/recent
我为 Drupal 7 编写了一个带有 instagram 图像流的模块(基于 hastag 的配置)。考虑到在开发者网站上注册了客户端应用程序并正确配置了重定向 url,我设法获得了 Access_token 并最终在我的前端使用了它。
但是问题是 API returns 我的数据是空的!
我了解到 2015 年 11 月 17 日之后有新的规则和政策,现在所有应用程序都需要 access_token 在 Instagram API 上提出任何类型的请求。更多信息 here
我做了显式授权(服务器端)流程。
是的,我确实在授权周期中指定了范围(基本 + public_content)
致电:
https://api.instagram.com/v1/tags/TAG_NAME/media/recent?access_token=ACCESS_TOKEN
给我结果:
HTTP 状态:200
{
meta: { code: 200 }
data: {
media_count: 1466
name: "TAG_NAME"
}
}
为什么?
如果有人看到这个,谢谢帮助。
您是否处于沙盒模式?
如果是:
The behavior of the API when you are in sandbox mode is the same as when your app is live, but comes with the following restrictions:
- Data is restricted to sandbox users and the 20 most recent media from each sandbox user
- Reduced API rate limits
意思是,如果您的沙盒用户没有带有该标签的图像,则不会显示数据。
我为 Drupal 7 编写了一个带有 instagram 图像流的模块(基于 hastag 的配置)。考虑到在开发者网站上注册了客户端应用程序并正确配置了重定向 url,我设法获得了 Access_token 并最终在我的前端使用了它。 但是问题是 API returns 我的数据是空的!
我了解到 2015 年 11 月 17 日之后有新的规则和政策,现在所有应用程序都需要 access_token 在 Instagram API 上提出任何类型的请求。更多信息 here
我做了显式授权(服务器端)流程。
是的,我确实在授权周期中指定了范围(基本 + public_content)
致电: https://api.instagram.com/v1/tags/TAG_NAME/media/recent?access_token=ACCESS_TOKEN
给我结果: HTTP 状态:200
{
meta: { code: 200 }
data: {
media_count: 1466
name: "TAG_NAME"
}
}
为什么?
如果有人看到这个,谢谢帮助。
您是否处于沙盒模式?
如果是:
The behavior of the API when you are in sandbox mode is the same as when your app is live, but comes with the following restrictions:
- Data is restricted to sandbox users and the 20 most recent media from each sandbox user
- Reduced API rate limits
意思是,如果您的沙盒用户没有带有该标签的图像,则不会显示数据。