Last month Instagram API was updated and I can't understand how work with it.
For example I want to get images via tag nexus5x
.
I do request to https://api.instagram.com/v1/tags/nexus5x?access_token=access_token
and response is
200 '{"meta":{"code":200},"data":{"media_count":5066,"name":"nexus5x"}}'
Can you explain me what to do next?
I also tried get recent items
https://api.instagram.com/v1/tags/nexus5x/media/recent?access_token=access_token
but get this response
200 '{"pagination":{"deprecation_warning":"next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"},"meta":{"code":200},"data":[]}'
P.S. App in sandbox.
You are in Sandbox mode, so it will return only media from your sandbox authorized user, here is information about this:
As another example, let's consider an endpoint that returns a list of media: /tags/{tag-name}/media/recent. The response returned by this endpoint will contain only media with the given tag, as expected. But instead of returning media from any public Instagram user, it will return only media that belongs to your sandbox users, restricted to the last 20 for each user.
So if u add a post in instagram with the hashtag then it will show up in api response, this is restriction in sandbox mode
Here is the link to more details about Sandbox mode: https://www.instagram.com/developer/sandbox/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With