Instagram API /tags/{tag-name}/media/recent changed behaviour

試著忘記壹切 提交于 2019-11-28 06:52:08
Daniel Trolezi

It seems that you're passing a media id as pagination. You can't do that anymore since Instagram changed the pagination values. It used to be a media id, but now is a string.

When you do the request, you'll receive an json like this:

{
    pagination: {
        next_max_tag_id: ...,
        deprecation_warning: "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead",
        next_max_id: ...,
        next_min_id: ...,
        min_tag_id: ...
        ...
    },
    meta: {
        ...
    },
    data: {
        ...
    }
}

Just use the next_max_id value as max_tag_id in your request. That should works.

A workaround for this until Instagram actually responds anyone is to use the old and deprecated next_max_id or next_max_tag_id. It seems somehow that max_tag_id has disappeared completely in the request response and been replaced with next_max_tag_id.

/tags/{tag-name}/media/recent?access_token={access-token}&next_max_id={next_max_id}

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