I'm trying to get all images with a specific tag by Instagram API. First I send this request:
https://api.instagram.com/v1/tags/tag?access_token=XXXX
and get response:
{
"meta": {
"code": 200
},
"data": {
"media_count": 8215885,
"name": "tag"
}
}
Then I try to start receive an images by next request:
https://api.instagram.com/v1/tags/tag/media/recent?access_token=XXXX
Result is:
{
"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": []
}
Why data
is empty?
I tried to send this request by adding count
parameter, result was the same. I think maybe
min_tag_id or max_tag_id is required, but I don't know where I can get it.
Trouble was in sandbox mode. Without LIVE mode app can receive only media that belongs to it's sandbox users. Answered here: New Instagram API - How do you request tagged media?