Tag: instagram api

使用Instagram gem获取所有用户的图片

我想使用instagram gem( https://github.com/Instagram/instagram-ruby-gem )获取我的所有图片,但我无法了解具体方法。 这是我到目前为止所尝试的: client = Instagram.client(access_token: token) client.user_recent_media.each do |media| puts media.images.thumbnail.url end 它显然有效(那些是我的Instagram图像),但我无法取得所有这些或以任何方式选择我想从Instagram获得哪些内容。 例如,我看到方法user_recent_media接受一个“count”属性,应该让我使用某种分页: (from https://github.com/Instagram/instagram-ruby-gem/blob/master/lib/instagram/client/users.rb#L150) @option options [Integer] :count (nil) Limits the number of results returned per page 不幸的是,我不知道这个分页应该如何工作。 例如,如果我请求1000个媒体元素(只是说所有这些元素)它不起作用并返回更少的元素,那时我被卡住了因为我不知道如何请求第2页 有没有人使用Instagramgem这样的东西? 任何帮助是极大的赞赏