You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.
Hello,
i run into a strange behavior. First I will explain the scenario. I use the Laravel framework and created a login route for Instagram (as mentioned in the docs). That works fine: The server redirects to Instagram and Instagram does redirect back to correct redirect_url, i entered.
Now I call the setAccessToken with the code returned from Instagram. Note: The variable $instagramManager is a proxy/facade to a Instagram Client instance. (I use this package for that https://github.com/vinkla/laravel-instagram)
What this does is getting the access-token from the configuration and trying to call directly the getToken method on the returned access-token. As we save before the the access_token is a json_encoded string. Therefore it is not possible to call the method getToken.
Do i miss here anything or is this a bug?
The text was updated successfully, but these errors were encountered:
…etimes a AccessToken class instance is returned from the config and sometimes only a encoded json string. The bug is reported in the main project larabros#42
Adds the .idea (PHPStorm settings) folder to the gitignore
Kit-kat1
pushed a commit
to Kit-kat1/elogram
that referenced
this issue
Sep 7, 2016
…etimes a AccessToken class instance is returned from the config and sometimes only a encoded json string. The bug is reported in the main project larabros#42
Adds the .idea (PHPStorm settings) folder to the gitignore
Hello,
i run into a strange behavior. First I will explain the scenario. I use the Laravel framework and created a login route for Instagram (as mentioned in the docs). That works fine: The server redirects to Instagram and Instagram does redirect back to correct redirect_url, i entered.
Now I call the setAccessToken with the code returned from Instagram. Note: The variable $instagramManager is a proxy/facade to a Instagram Client instance. (I use this package for that https://github.com/vinkla/laravel-instagram)
Everything works fine. I can see the token stored in the variable $token.
Now I am trying to get the users information:
And the following error appears:
Call to a member function getToken() on string in /var/www/html/vendor/larabros/elogram/src/Http/Middleware/AuthMiddleware.php on line 36
Strange. Some further inspection:
In the Client.php I see from line 240 following code:
So the access-token will be saved into the config under the key access_token and very important as json encoded string.
In the AuthMiddleware.php on line 33 I see following code:
What this does is getting the access-token from the configuration and trying to call directly the getToken method on the returned access-token. As we save before the the access_token is a json_encoded string. Therefore it is not possible to call the method getToken.
Do i miss here anything or is this a bug?
The text was updated successfully, but these errors were encountered: