gpt4 book ai didi

ios - Instagram 和 iOS。与当前用户获得很多喜欢的照片

转载 作者:行者123 更新时间:2023-11-29 12:41:16 24 4
gpt4 key购买 nike

我正在使用 Instagram api

我的查询是

api.instagram.com/v1/users/[USER_ID]/media/recent?count=3818

我只得到 33 张按日期排序的照片

但是,我需要加载所有被点赞更多的用户照片

我在这里错过了什么?

最佳答案

您可以使用分页。参见 http://instagram.com/developer/endpoints/有关分页的信息。您需要依次遍历结果页面,每次都使用结果在分页对象中指定的 next_url 请求下一部分。

来自 Instagram

pagination

Sometimes you just can't get enough. For this reason, we've provided a convenient way to access more data in any request for sequential data. Simply call the url in the next_url parameter and we'll respond with the next set of data.

{ ... "pagination": { "next_url": "https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296", "next_max_id": "13872296" } }

On views where pagination is present, we also support the "count" parameter. Simply set this to the number of items you'd like to receive. Note that the default values should be fine for most applications - but if you decide to increase this number there is a maximum value defined on each endpoint.

关于ios - Instagram 和 iOS。与当前用户获得很多喜欢的照片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24848697/

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