I'm using https://api.instagram.com/v1/locations/{location-id}/media/recent
endpoint of the Instagram API to fetch posts in a specific location, but i'm having an issue implementing pagination.
the request https://api.instagram.com/v1/locations/106970059456743/media/recent?ACCESS_TOKEN=(ACCESS_TOKEN)
the problem comes with the MAX_ID and MIN_ID parameters, because in the response i get from the first query the pagination object comes empty (see https://www.instagram.com/developer/endpoints/), i've tried pluggin in the id's of the most recent posts in the parameters and that doesn't seem to work when i'm asking for new posts, but it does work whem i'm asking for older post.
i've successfully implemented the pagination for the https://api.instagram.com/v1/tags/{tag}/media/recent
endpoint but apparently this endpoints use different paginations (media/recent does return a pagination object in the response).
max_id
. pagination will not work in sandbox, this is expected behavior – krisrak