Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instagram API Retrieve Hash Media - next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead

I want to fetch instagram hashtag media like iconosquare.

So I'm using Cosenary PHP Api to kickstart my instagram project.

After I authenticate/access the url with the $instagram->getLoginUrl()

Then the page will redirect me to my callback url with ?code parameters.

In my callback url's php files, I use the code and get my access_token :

$data  = $instagram->getOAuthToken($_GET['code']);
$access_token = $data->access_token;

So with the access_token, am trying to get coffee media tag files

$url   = "https://api.instagram.com/v1/tags/coffee/media/recent?access_token={$access_token}";

and access it using Php CURL method,

but the data return to me as

array(3) {
  ["pagination"]=>
  array(1) {
    ["deprecation_warning"]=>
    string(94) "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"
  }
  ["meta"]=>
  array(1) {
    ["code"]=>
    int(200)
  }
  ["data"]=>
  array(0) {
  }
}

May I know what is min_tag_id and max_tag_id ? I added the parameter follow this link but still achieve the same result.

I can't search any documentation on instagram developer website.

like image 868
Mavichow Avatar asked Jan 11 '16 11:01

Mavichow


1 Answers

I just found out my Instagram Application is in sandbox mode. So it doesn't return me any data ( it because my instagram doesn't have #coffee hash tag, try to search your own ( or any sandbox user's ) instagram's hashtag instead...

If the Application's review status is approved, then it will retrieve public hashtag instead of sandbox user's hashtag.

Instagram did have stated on here that there is some limitation when an application is in sandbox mode.

like image 96
Mavichow Avatar answered Oct 22 '22 16:10

Mavichow