简体   繁体   English

Instagram和iOS。 与当前用户分享很多喜欢的照片

[英]Instagram and iOS. get photo with a lot of likes with current user

I am using Instagram api 我正在使用Instagram API

My query is 我的查询是

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

I get only 33 photos that is ordered by date 我只得到按日期排序的33张照片

But,I need to load all the users photo which has more likes 但是,我需要加载所有喜欢的用户照片

what am I missing here ? 我在这里想念什么?

You can use Pagination.See http://instagram.com/developer/endpoints/ for information on pagination. 您可以使用分页。有关分页的信息,请参见http://instagram.com/developer/endpoints/ You need to subsequentially step through the result pages, each time requesting the next part with the next_url that the result specifies in the pagination object. 您需要随后逐步浏览结果页面,每次都请求下一部分以及结果在分页对象中指定的next_url。

From instagram 从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. 只需在next_url参数中调用url,我们将用下一组数据进行响应。

{ ... "pagination": { "next_url": " https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296 ", "next_max_id": "13872296" } } {...“ 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. 请注意,对于大多数应用程序,默认值应该很好-但是,如果您决定增加此数字,则每个端点上都会定义一个最大值。

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

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