title: wordpress page is broken when trying to connect to facebook php SDK
body: <p>I have a strange issue when trying to connect to Facebook php SDK from my WordPress site. I have followed all instructions as shown on Facebook developers and other sites - I have an app on Facebook and I have downloaded the latest Facebook SDK.</p>
  
  <pre><code>session_start();
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookSession.php');
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookRequest.php');
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookResponse.php');
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookSDKException.php');
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookRequestException.php');
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/GraphObject.php');
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookRedirectLoginHelper.php');
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookAuthorizationException.php');
  require_once(ABSPATH . 'facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookJavaScriptLoginHelper.php');
  
  use Facebook\FacebookSession;
  use Facebook\FacebookJavaScriptLoginHelper;
  use Facebook\FacebookRedirectLoginHelper;
  use Facebook\FacebookRequest;
  use Facebook\FacebookResponse;
  use Facebook\FacebookSDKException;
  use Facebook\FacebookRequestException;
  use Facebook\FacebookAuthorizationException;
  use Facebook\GraphObject;
  
  FacebookSession::setDefaultApplication('172357792955421', 'b0a5bc2aeb8b2a8712c0af6f01e45c1a');
  
  $helper = new FacebookJavaScriptLoginHelper();
  try {
     $session = $helper-&gt;getSession();
  } catch(FacebookRequestException $ex) {
     echo 'Facebook returns an error';
  } catch(\Exception $ex) {
     echo 'When validation fails or other local issues';
  }
  if ($session)
     echo 'logged in';
  else
     echo 'not logged in';
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>require_once( ABSPATH . 'facebook-php-sdk-v4-4.0-dev/autoload.php' );
  </code></pre>
  
  <p>instead of requiring each single php.</p>
  
  <p>The problem is that the page is broken - cut off, with no header and side tab (php error). I dont see any errors or warnings. <strong>if I make some of the require_once as comments (with //), then the page is not cut</strong> (but then of course this doesn't work). </p>
  
  <p>I guess something in WordPress is doing the problem, but I can't figure out what it is. Appreciate any help with this.</p>
  
  <p>Thanks</p>
  
  <p>UPDATE: I get this php error: on line 3 Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /hermes/bosnaweb03b/b2442/ipg.ibetyouinfo/facebook-php-sdk-v4-4.0-dev/src/Facebook/FacebookResponse.php on line 137</p>
  
  <p>so the problem is in the facebook php files? how can I fix that?</p>