Why is facebook php sdk not managing token lifetime?

The facebook developer docs state the following:

The official Facebook SDKs manage token usage times for you. When using iOS, Android or our JavaScript SDK, the SDK will handle making sure tokens are updated before they expire. ( https://developers.facebook.com/docs/facebook-login/access-tokens )

So it is obvious that their client SDK is actively handling refresh tokens before they expire, but not their server side SDK .... (?)

And indeed, I have a website that uses their php sdk - and about every 2 hours, I try something on my site, and my api call throws a FacebookApiException: "The request should use the active access token information about current user. " On page refresh, the token seems to be renewed and the api calls work again.

Why is this, or more importantly, how can I proactively refresh tokens before they expire when using php sdk (to avoid page crashes once every 2 hours)? I would rather not use the javascript sdk

+3
php facebook facebook-graph-api facebook-php-sdk


source to share


No one has answered this question yet

Check out similar questions:

2414
Why shouldn't I use the mysql_ * functions in PHP?
8
how to update facebook access token for backend (in facebook-php SDK)?
3
How to refresh Facebook access token using its C # SDK
3
facebook graph api & php sdk, delete events!
1
facebook sdk token access session expires too early
0
Automatic update Facebook access_token
0
Why are my Facebook access tokens showing up in Javascript
0
facebook php re-authentication: application to server
0
Share link on facebook using php-sdk
0
Update Facebook Token PHP SDK



All Articles
Loading...
X
Show
Funny
Dev
Pics