Instagram-PHP-API icon indicating copy to clipboard operation
Instagram-PHP-API copied to clipboard

Access-Token | The access_token provided is invalid.

Open dahormez opened this issue 7 years ago • 5 comments

Session saved Access-token, getUser works all other functions not. Please help ;-)

dahormez avatar Sep 20 '16 21:09 dahormez

Having this exact same problem... heard any updates?

cbenjamin avatar Oct 05 '16 14:10 cbenjamin

Also the same issue... any help??? EDIT: This Works: https://github.com/cosenary/Instagram-PHP-API/pull/191/commits/484c974a1aae001f538ad354a004c354dd492ae5

robertrimke avatar Oct 18 '16 12:10 robertrimke

Experiencing the same problem. Is there any solution.. or update??

subasah avatar Nov 24 '16 06:11 subasah

Same Issue. I tried to apply the update 484c974 mentioned above but it doesn't seem to solve anything. Any solution?

marko85to avatar Dec 12 '16 12:12 marko85to

The issue is that in __construct the setApiKey should be setAccessToken. Should be like this:

if (is_array($config)) {
        // if you want to access user data
        $this->setApiKey($config['apiKey']);
        $this->setApiSecret($config['apiSecret']);
        $this->setApiCallback($config['apiCallback']);
    } elseif (is_string($config)) {
        // if you only want to access public data
        $this->setAccessToken($config); // Change here
    } else {
        throw new InstagramException('Error: __construct() - Configuration data is missing.');
    }

tsukasa1989 avatar Oct 20 '17 12:10 tsukasa1989