cosenary / Instagram-PHP-API

An easy-to-use PHP Class for accessing Instagram's API.
http://cosenary.github.com/Instagram-PHP-API
BSD 3-Clause "New" or "Revised" License
1.46k stars 787 forks source link

nothing works #188

Open m1chae11 opened 8 years ago

m1chae11 commented 8 years ago

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;

vinkla commented 8 years ago

Please see #182

m1chae11 commented 8 years ago

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

Does it mean that instagram php api doesnt work anymore?

vinkla commented 8 years ago

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