I am asking user to login from FB JS SDK. I get accessToken and userID and I save it in a database. And then internally every few minutes I call a php function at the server to check if there is an entry in the database and get all the information I can from accessToken.
The server side code is:
$facebook = new Facebook(array(
'appId' => 'xxx',
'secret' => 'xxxx',
));
$facebook->setAccessToken($savedAccessToken);
$user = $facebook->getUser();
$profile = $facebook->api('/me');
I am able to login as $user is not 0. But I get the error as:
OAuthException: The access token could not be decrypted
Please help me resolve the issue. Thanks