Using a Plugin to Show/Hide Content after Header?

You can use this library located at Github.

    <?php

  require './facebook.php';

   $facebook = new Facebook(array(
  'appId'  => 'YOUR APP ID',
  'secret' => 'YOUR API SECRET',
'cookie' => true, // enable optional cookie support
));


 if ($facebook->getSession()) {
   PLACE YOUR WP LOOP HERE
} else {
   echo '<a href="' . $facebook->getLoginUrl() . '">Login</a>';
   ADD YOUR APP's 'Connect' button here.
}
    ?>

Include facebook.php from the library located at Github (2nd line).

error code: 523