To fix above error you need to make sure that your access token is currently active. Also please make sure you are in logged in condition. After this please try to clean the cookies and also your cache from your browser
by using ctrl+shift+del.
If even after doing above steps you are still facing the error then in that case you must check if you are getting 0 as the user id in return from your
$facebook->getUser().Then you must also check your
getAccessTokenFromCode() from the
base_facebook.php and after that you must verify your
access_token_response format as there is the possibility of it may be in JSON format.
So you must try to use very appropriate decoding method to get your
It will certainly help you.