Facebookからログアウトしても、アクセストークンが無効であるとは思えません。
if ($user) {
try {
// Proceed knowing you have a logged in user who's authenticated.
$user_profile = $facebook->api('/me');
echo "Name: " . $user_profile['name'];
} catch (FacebookApiException $e) {
// If the user is logged out, you can have a
// user ID even though the access token is invalid.
// In this case, we'll get an exception, so we'll
// just ask the user to login again here.
error_log($e);
$user = null;
}
}
Facebookからログアウトしても、ユーザー名が返されます。したがって、アクセストークンはまだ有効であるようです。どうすればこれを修正できますか?
または、iframeのFB環境でのみアプリをテストする必要がありますか?