cosenary/Instagram-PHP-API

nothing works

m1chae11 opened this issue · 3 comments

hi there, after running the script, i receive these notices:

Notice: Undefined index: X-Ratelimit-Remaining in C:\xampp\htdocs\sandbox\Instagram-PHP-API-master\Instagram.php on line 633

Notice: Undefined index: code in C:\xampp\htdocs\sandbox\Instagram-PHP-API-master\example.php on line 16

Notice: Undefined property: stdClass::$access_token in C:\xampp\htdocs\sandbox\Instagram-PHP-API-master\Instagram.php on line 737

Notice: Undefined property: stdClass::$user in C:\xampp\htdocs\sandbox\Instagram-PHP-API-master\example.php on line 19

Notice: Trying to get property of non-object in C:\xampp\htdocs\sandbox\Instagram-PHP-API-master\example.php on line 19
Your username is: 

settings are:

require 'Instagram.php';

use MetzWeb\Instagram\Instagram;

$instagram = new Instagram(array(
    'apiKey'      => 'xxx',
    'apiSecret'   => 'xxx',
    'apiCallback' => 'http://localhost/sandbox/Instagram-PHP-API-master/callback.php'
));

$result = $instagram->getPopularMedia();

// grab OAuth callback code
$code = $_GET['code'];

///testing
$data = $instagram->getOAuthToken($code);
$instagram->setAccessToken($data);
echo 'Your username is: ' . $data->user->username;

Please see #182

hmm, i have changed it from false to true, and still the same?

Does it mean that instagram php api doesnt work anymore?

Please note that this library doesn't yet support their new updates.