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
Ah, the example code is just one way of keeping track of the access token. In your own application you may want to consider storing it in a database vs a file, but that is up to you.
The way this example code works is you supply where to save the access token, which becomes a serialized AccessToken object. If the contents of the file are null, then a new access token is requested in the makeRequest method of the example.
The reason it’s returning null is because it is. Until you make a request, which requests a new access token if null, the file itself will most likely be empty.
In the example, my understanding is that it stores the token for X minutes so it can be re-used, then re-issues it once it needs to. What I'm seeing though in the example code, which I'm attempting to mimic, is that the token isn't getting stored at all, so each time it's issuing a new one. Am I understanding the implementation correctly? Maybe I'm storing it incorrectly in my code? I appreciate your help
Hi Andrew! Thank you again for such a great library, you saved me literally hundreds of hours of dev work.
I'm integrating the library into my Laravel application and running into an issue where the AccessToken doesn't seem to be getting saved.
Is how I have it integrated.
When I
dd($this->client->accessTokenPath)
I get"/home/vagrant/code/storage/linkshare_token"
When I
dd($this->client->accessToken)
I getNULL
I would think I need to fix this to ensure the token is getting saved properly so it can be re-used instead of getting a new token on every call.
The call gets made successfully and I do see results from the call.
TIA!
The text was updated successfully, but these errors were encountered: