I am using the new 4. * facebook php SDK and I have a problem !;)
Basically I am trying to find a way to make api schedule requests after the first redirect, when the user is sent back to my site after logging in to facebook . In this case, I (in mine index.php):
$h = FacebookRedirectLoginHelper("blablabla");
$request = new FacebookRequest($h->getSessionFromRedirect(), 'GET', '/me');
$me = $request->execute()->getGraphObject();
and it works great, and I can print the date of the registered user.
My problem is that if I reload the (f5) page index.php, I get an exception:
Fatal error: Uncaught exception 'Facebook\FacebookAuthorizationException' with message 'This authorization code has expired.' in /home/nourdine/development/faisbuk/vendor/facebook/php-sdk-v4/src/Facebook/FacebookRequestException.php:87
So my question is: where should I get a new authorization code in order to create new graphical api calls with an authenticated user even on pages that are not executed as a result of the facebook login process?
thank