title: Facebook Connect - Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects
body: <p>I am getting this error when trying to logout of facebook connect</p>
  
  <blockquote>
    <p>Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many
    redirects.</p>
  </blockquote>
  
  <pre><code>function facebook_logout(){
  
          $user = $_SESSION[ 'facebook_userid' ];
  
          $facebook = new Facebook( array(
  
              'appId'  =&gt; APP_ID,
              'secret' =&gt; APP_SECRET,
  
          ) );
  
          $_SESSION[ 'facebook_userid' ] = "";
          $_SESSION[ 'logged' ] = FALSE;
          $url = $facebook-&gt;getLogoutUrl();
  
          header( "Location: $url" );
  
  }
  
  facebook_logout();
  </code></pre>