Instagram API: I want to get recent images based on tag, but I only recieve my own

↘锁芯ラ 提交于 2019-12-19 08:57:42

问题


I want to use Instagram API to get the latest images based on a specific tag.

When I use:

https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN

I only recieve the images that my user has created with that tag. I want to get all tagged images, not just my own. Is it supposed to do that?

When I try:

https://api.instagram.com/v1/tags/{tag-name}?access_token=ACCESS-TOKEN

Then it works and I get statistics from not just my own images.
Any help would be awesome!


回答1:


You are in Sandbox mode, so it will return only media from your sandbox authorized user, here is information about this:

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.

Here is the link to more details about Sandbox mode: https://www.instagram.com/developer/sandbox/

Once your app is approved, you will see all media.



来源:https://stackoverflow.com/questions/34397561/instagram-api-i-want-to-get-recent-images-based-on-tag-but-i-only-recieve-my-o

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