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

How to make calls in multiple pages? #132

Closed sophiekovalevsky closed 9 years ago

sophiekovalevsky commented 9 years ago

Hi everyone! I would like to ask you about a kind of problem in my app. I'm trying to make calls in differents pages of my app but with no success. I'm using methods where authentication is obligatory.

What I'm gonna trying to do is this: After the user have logged using the callback url. I would like to make a method call since other page where is not the callback page. But it's look like the authentication methods are not allowed out of the callback's scope.

What should be the procedure here to follow?

Thanks in advance.

sophiekovalevsky commented 9 years ago

I got the answer. I'm gonna put the answer here just in case if someone may need it in future. Store the token into a session variable and then use the method setAccessToken(). With this, all it's gonna work.