Reputation: 559
I'm trying to retrieve content from the Instagram API using the https://api.instagram.com/v1/tags/{tag-name}/media/recent?access_token=ACCESS-TOKEN
endpoint and can do so for the first request but when I try to retrieve posts older than what is initially given I can't seem to load them. When I run this endpoint initially I get 13 Instagram images retrieved in the JSON data array, I also get a pagination array which is below.
`
pagination: {
next_min_id: "AQDPrQwBDg1kNTDYJEcmcio1XQjibCpFicoHeNlXvM6Du3DVsLRpQDZMPaPUytA6Oehh_7GIZI2mSB8LdDCcUd8NcACACivP6b_xxoEfSERoww",
min_tag_id: "AQDPrQwBDg1kNTDYJEcmcio1XQjibCpFicoHeNlXvM6Du3DVsLRpQDZMPaPUytA6Oehh_7GIZI2mSB8LdDCcUd8NcACACivP6b_xxoEfSERoww",
deprecation_warning: "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"
},
`
When I try using the value of either next_min_id
or min_tag_id
as the value for the max_tag_id
in subsequent requests it has no affect, I just get the original set of results back. Here's an example of the URL I'm using with the max_tag_id
parameter.
`
https://api.instagram.com/v1/tags/pink/media/recent?access_token=ACCESS-TOKEN&max_tag_id=AQDPrQwBDg1kNTDYJEcmcio1XQjibCpFicoHeNlXvM6Du3DVsLRpQDZMPaPUytA6Oehh_7GIZI2mSB8LdDCcUd8NcACACivP6b_xxoEfSERoww
`
I have also tried using min_tag_id
but with the same results. The application is only running in Sandbox mode but as far as I'm aware that should mean I can only retrieve posts from my account which is all I'm looking to do. I've also counted that the API retrieves 13 results & that there are more images than that with the "pink" tag.
There have been many other similar post to this on here but none have resolved the issue for me.
Upvotes: 1
Views: 221
Reputation: 12952
You only get maximum of 20 images in Sandbox mode and pagination does not work in sandbox mode
Upvotes: 1