title: CakePHP / Facebook Plugin - Logout button linking to #
body: <p>I'm attempting to use the Facebook plugin with CakePHP - all seems like it's going well - I can use the like/recommend buttons - I can login via facebook - it asks for permission for things that I told it to...etc</p>
  
  <p>The problem is, my LOGOUT button just links to whatever page you're on plus a #</p>
  
  <p>So - if I'm on index.php, the logout button links to index.php#</p>
  
  <p>I AM including the correct facebook html tag and init() in the correct locations.</p>
  
  <p>Any thoughts?</p>
  
  <p>Here is my code for the logout button:</p>
  
  <pre><code>if(!$session-&gt;check('Auth.User.id') &amp;&amp; !$this-&gt;Connect-&gt;user('id')) {
      echo $this-&gt;Html-&gt;link('LOGIN', array('controller' =&gt; 'users', 'action' =&gt; 'login'));
  } else {     
      echo $facebook-&gt;logout(array('redirect' =&gt; array('controller'=&gt;'users', 'action'=&gt;'logout'), 'label' =&gt; 'LOGOUT'));
  }
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>And to be clear - I wouldn't care if the link is a #, but the logout button does nothing at all except bump the browser up to the top.  It doesn't log out, it doesn't refresh the page.</p>
  
  <hr>
  
  <p><strong>EDIT2</strong></p>
  
  <p>If I start a fresh browser, login into Facebook, then go to my site, it auto-logs me in - at that point, the logout button works perfectly.  But - if I log-in via a user-login on my site (instead of FB), the logout button just pops me to the top of the page (ie - the empty anchor link)</p>