简体   繁体   English

使用Instagram API中的主题标签获取公共图像

[英]Get public images with hashtag from Instagram API

I'm trying to get any photo from any user on Instagram with a certain hashtag, but when I go to: 我试图从Instagram上的任何用户那里获得任何带有特定标签的照片,但是当我去的时候:

https://api.instagram.com/v1/tags/{hashtag}/media/recent?access_token=ACCESS_TOKEN

I only get my photos. 我只收到我的照片。

If your app is on sandbox mode than that explains it. 如果您的应用程序处于sandbox mode ,那么解释它。

The behaviour of the request /tags/{tag-name}/media/recent changes to return only tagged posts from sandbox users. request /tags/{tag-name}/media/recent更改的行为仅返回沙箱用户的已标记帖子。
This is also correct for all other API requests; 这对所有其他API请求也是正确的; When app is on sandbox mode , the API behaves as if the sandbox users are the only users on Instagram. 当应用程序处于sandbox mode ,API的行为就像沙箱用户是Instagram上的唯一用户一样。

From the documentation : documentation

As another example, let's consider an endpoint that returns a list of media: /tags/{tag-name}/media/recent . 作为另一个例子,让我们考虑一个返回媒体列表的端点: /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用户返回媒体,它将仅返回属于您的沙箱用户的媒体,限制为每个用户的最后20个。

You can use the Instagram API console (APIGEE) to see this request returns public data with a different authentication type. 您可以使用Instagram API console (APIGEE)查看此请求返回具有不同身份验证类型的公共数据。

Also, note that if all your app does is displaying public content from Instagram then Instagram would not approve the app outside sandbox mode. 此外,请注意,如果您的所有应用都显示来自Instagram的公共内容,则Instagram不会批准沙盒模式之外的应用。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM