In the facebook developer docs, the following is stated:
Facebook's official SDKs manage the lifetime of tokens for you. When using iOS, Android or our JavaScript SDK, the SDK will handle making sure that tokens are refreshed before they expire. (https://developers.facebook.com/docs/facebook-login/access-tokens)
So apparently their client-side SDK's proactively handle renewing tokens before they expire, but not their server-side SDK's....(?)
and indeed, I have a website that uses their php sdk - and approximately every 2 hours, I'll try something in my site, and my api call results in a FacebookApiException, "An active access token must be used to query information about the current user." Upon page refresh, the token is apparently renewed and the api calls work again.
Why is this, or more importantly, how can I proactively renew tokens before they expire, when using the php sdk (in order to avoid having a page fail on me once every 2 hours)? I would prefer not to use the javascript sdk