gpt4 book ai didi

javascript - Instagram 新 API,通过标签获取项目

转载 作者:搜寻专家 更新时间:2023-10-31 22:52:14 25 4
gpt4 key购买 nike

上个月 Instagram API 更新了,我不明白如何使用它。

例如我想通过标签nexus5x获取图像。

我请求 https://api.instagram.com/v1/tags/nexus5x?access_token=access_token

响应是

200 '{"meta":{"code":200},"data":{"media_count":5066,"name":"nexus5x"}}'

你能解释一下下一步该怎么做吗?

我也试过获取最近的项目

https://api.instagram.com/v1/tags/nexus5x/media/recent?access_token=access_token

但得到这个回应

200 '{"pagination":{"deprecation_warning":"next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"},"meta":{"code":200},"data":[]}'

附言沙盒中的应用程序。

最佳答案

您处于沙盒模式,因此它将仅返回来自沙盒授权用户的媒体,以下是相关信息:

As another example, let's consider an endpoint that returns a list of media: /tags/{tag-name}/media/recent. The response returned by this endpoint will contain only media with the given tag, as expected. But instead of returning media from any public Instagram user, it will return only media that belongs to your sandbox users, restricted to the last 20 for each user.

因此,如果您在 instagram 中添加带有主题标签的帖子,那么它将显示在 api 响应中,这是沙盒模式中的限制

这里是有关沙盒模式的更多详细信息的链接:https://www.instagram.com/developer/sandbox/

关于javascript - Instagram 新 API,通过标签获取项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34199140/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com