title: suddenly facebook connect stopped working
body: <p>A few days ago the facebook connection with our website stopped working all of the sudden, nothing was changed to the code???</p>
  
  <p>Facebook made some changes???</p>
  
  <p><a href="http://www.presbium.sk/vstup-pre-uchadzacov/" rel="nofollow">http://www.presbium.sk/vstup-pre-uchadzacov/</a></p>
  
  <pre><code>require 'facebook-php-sdk/src/facebook.php';
  
      $facebook = new Facebook(array(
      'appId'  =&gt; 'YOUR_APP_ID',
      'secret' =&gt; 'YOUR_APP_SECRET',
      ));
  
      // Get User ID
      $user = $facebook-&gt;getUser();
  
      if ($user) {
      try {
      // Proceed knowing you have a logged in user who's authenticated.
      $user_profile = $facebook-&gt;api('/me');
      } catch (FacebookApiException $e) {
      error_log($e);
      $user = null;
       }
  }
  
  if ($user) {
    $logoutUrl = $facebook-&gt;getLogoutUrl();
  } else {
   $loginUrl = $facebook-&gt;getLoginUrl();
  }
  
  
  enter code here
  </code></pre>