shet_tayyy
shet_tayyy

Reputation: 5755

Whats the new max_tag_id value for pagination set by Instagram API?

I am creating app where I use Instagram API to display images filtered by Tag, date and likes. Previously, to filter date instagram used to append the epoch time with max_tag_id and min_tag_id. Now, the format has changed:

"pagination":  {
  "next_max_tag_id": "962224976421224235",
  "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": "962224976421224235",
  "next_min_id": "962225472549366575",
  "min_tag_id": "962225472549366575",
  "next_url": "https://api.instagram.com/v1/tags/nyc/media/recent?client_id=02e15f8b37f34d1f8da7ddcb0a55bae6&max_tag_id=962224976421224235"
}

max_tag_id=962224976421224235

How is max_tag_id calculated now? Instagram has not updated it's API doc on the same. Also, gramfeed.com had implemented the date filtering functionality but now they have disabled it. Can anyone help me with this?

Upvotes: 0

Views: 2358

Answers (1)

krisrak
krisrak

Reputation: 12952

the new max_tag_id is the media_id of the next photo.

So in your case, if you make a request with the next_url, the first photo in the response will have the id 962224976421224235, (the actual id will look like xxx_xxxx which is mediaId_userId)

Cannot do time filter anymore :(, so I disabled it in http://gramfeed.com

Upvotes: 2

Related Questions