title: how to properly login/logout with facebook php sdk
body: <p>Ok so I'm using Facebook PHP SDK</p>
  
  <p>currently I'm rendering the login/logout buttons as the following:</p>
  
  <pre><code>$facebook = new Facebook(array(
    'appId'  =&gt; $fbAppID,
    'secret' =&gt; $fbSecret,
    'cookie' =&gt; true,
  ));
  
  
  $uid = $facebook-&gt;getUser();
   if ($uid != false) {
     $button = ' &lt;img src="/fb-logout.png"&gt;&lt;/img&gt;';
     $url = $facebook-&gt;getLogoutUrl();
   } else {
     $button = ' &lt;img src="/fb-login.png"&gt;&lt;/img&gt;';
     $url = $facebook-&gt;getLogoutUrl();
   }
     echo '&lt;a href="' . $url . '"&gt;' . $button . '&lt;/a&gt;';
  </code></pre>
  
  <p>But then when a user "Logs Out" using the button with the URL derived from the getlogouturl() function, it logs out from Facebook just fine but it doesn't log out from my app...ie when I call $facebook->getUser() once again, it returns the user ID again even though he's not even logged out from facebook</p>
  
  <p>am I doing something wrong? What should I do so that user also logs out from my app when logged out from Facebook</p>