Facebook getUser() function returning user ID after logout
I'm developing using the Facebook PHP SDK. I wanted to make it so that when the user logs out of Facebook, they will automatically be logged out of my website too. I am using the following code to detect the session, using the session cookie: $facebook->getUser(); For some reason, the getUser() function still returns the user's Facebook ID, even after they have logged out of Facebook on their website. Am I to detect the session first using another Function? On the official documentation example here , is the following excerpt from their comments: // Get User ID $user = $facebook->getUser(); //