I do not know what happened, but it was working on my Instagram integration site. I did a randomization of photos. But nothing has stopped working, the images do not appear anymore.
For those familiar with the Instagram Developers API Console, I tested the parameters and worked. Does anyone know if there has been any modification in how to authenticate in Instagram ...? Or if CURL might be a problem if you change the PHP version?
Follow the code below:
include_once 'instagram.class.php';
$insta_settings = array(
'client_id' => '***********',
'client_secret' => '***********',
'redirect_uri' => 'http://********.com.br/auth/instagram',
'scope' => array('likes')
);
---------------------------------------------------------------
define('INSTAGRAM_ID', '**********');
define('INSTAGRAM_TOKEN', '**********');
$insta_settings['access_token'] = INSTAGRAM_TOKEN;
$instagram = new Instagram($insta_settings);
$instagram->initRequest('GET');
$instagram->requestUrl('/users/'.INSTAGRAM_ID.'/media/recent');
$images = $instagram->performRequest();
If I make a print_r($images)
does not get anything.
The class I'm using is this: