Instagram 位置/搜索端点不支持分页是否正确? [英] Is it correct that the Instagram Location/Search endpoint does NOT support pagination?

查看:29
本文介绍了Instagram 位置/搜索端点不支持分页是否正确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过几篇关于 Instagram API 一次只返回 20 个结果的帖子.在许多情况下,人们建议您只需使用分页信息中返回的下一个 URL.我可以接受,但是

I have read several postings about the fact that the Instagram API returns only 20 results at a time. In many cases, people have suggested that all you need to do is to use the next URL which is returned in the pagination information. I would be fine with that, but the JSON returned by

https://api.instagram.com/v1/locations/search?

似乎没有任何分页信息.我看到一个帖子说/media/search 不支持分页.我只是想确认/locations/search 也是如此.谁能确认一下?

does not appear to have any pagination information. I have seen a posting that says that /media/search does not support pagination. I just wanted to confirm that the same is true for /locations/search. Can anyone confirm?

如果这是正确的,有没有人想过如何获取特定区域内所有 Instagram 活动的列表,而不仅仅是前 20 个左右的活动?

And if this is correct, does anyone have any thoughts about how you can get a list of all Instagram events in a specific area, rather than just the first 20 or so?

推荐答案

/media/search 端点没有分页,但是你可以使用 url param max_timestamp,获取 api 响应中最后一张照片的 created_time 并将其作为 max_timestamp 应用于下一个 url 调用,它将返回下一个 20.就是这样我在这里实现:http://www.gramfeed.com/instagram/map

/media/search end point does not have pagination, but you can get next set of 20 pics by using url param max_timestamp, get the created_time of the last photo in api response and apply it as max_timestamp for next url call, it will return the next 20. Thats how I implemented here: http://www.gramfeed.com/instagram/map

对于 locations/search 终点,时间戳不适用,您可以更改 distance url 参数并获得更多结果:http://www.gramfeed.com/instagram/places

for locations/search end point, timestamp does not apply, you can change distance url param and get more results: http://www.gramfeed.com/instagram/places

这篇关于Instagram 位置/搜索端点不支持分页是否正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆