phpinstagraminstagram-api

Get Recent Media return deprecation_warning


I have spent hours for this issue, and it is driving me crazy.

I have access token and it works except for recent tagged media endpoints. I called it using PHP:

$url = "https://api.instagram.com/v1/tags/omg/media/recent?access_token={ACCESS_TOKEN}";
$curl_connection = curl_init($url);
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);

//Data are stored in $data
$data = json_decode(curl_exec($curl_connection), true);
curl_close($curl_connection);
echo '<pre>';
echo print_r($data);
echo '</pre>';

And this is the result I got:

{"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": []}

While the other API seems to work fine except that. Is instagram tagged media API not working properly? Anyone is having this issue?


Solution

  • The status is 200, your request is OK. The problem is that your app still in sandbox mode. This will only return data from users that you've added on the sandbox.

    From the Instagram website:

    Instagram Platform and documentation update. Apps created on or after Nov 17, 2015 will start in Sandbox Mode and function on newly updated API rate-limits and behaviors. Prior to going Live, and being able to be used by people other than the developers of the app, these apps will have to go through a new review process. Please read the API documentation or the Change Log for more details.

    Any app created before Nov 17, 2015 will continue to function until June 1, 2016. On that date, the app will automatically be moved to Sandbox Mode if it wasn't approved through the review process. The previous version of our documentation is still available here.

    You will need to go through the app review process again to receive a new API Key, which involves providing a description of the api permissions you need and demonstrating how those permissions are used via a submitted video.

    More details on http://instagram.com/developer