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 782 forks source link

access_token provided is invalid #257

Open hassan-khalil opened 5 years ago

hassan-khalil commented 5 years ago

Each time i login and try to get user media or serch user it gives error .

 +"meta": {#176 ▼
    +"code": 400
    +"error_type": "OAuthAccessTokenException"
    +"error_message": "The access_token provided is invalid."
  }

on authenticating i am receiving access token. this is my code, i think access token which i receive from instagram is not working.

$instagram = new Instagram(config('instagram'));
$instagram->setAccessToken(Session::get('token'));
dd($instagram->getUserMedia(Session::get('id'), 10));