Possible Duplicate:
facebook Uncaught OAuthException: An active access token must be used to query information about the current user.
I have a problem with v3 of php api facebook.
This is the error: OAuthException: An active access token must be used to query information about the current user.
This is the code:
$facebook = new Facebook(array(
'appId' => 'xxxxx',
'secret' => 'xxxxx',
));
$user = $facebook->getUser();
$accessToken = $facebook->getAccessToken();
if ($user) {
try {
$events = $facebook->api('/me');
} catch (FacebookApiException $e) {
echo ($e);
}
}