title: Symfony2 + Facebook-SDK 4.0 - How to integrate?
body: <p>If updated now my symfony project to facebook-sdk-v4. My question is now how to integrate it to use in my controllers?</p>
  
  <p>For the old version i had the following line in my autoload.php</p>
  
  <pre><code>//Loading facebook from vendor
  require_once __DIR__ . '/../vendor/facebook/php-sdk/src/facebook.php';
  </code></pre>
  
  <p>then in the controller i could something like that</p>
  
  <pre><code>$facebook = new \Facebook(array(
    'appId'  =&gt; $this-&gt;container-&gt;getParameter('fb_appid'),
    'secret' =&gt; $this-&gt;container-&gt;getParameter('fb_secret')
  ));
  $fb_userid = $facebook-&gt;getUser();
  </code></pre>
  
  <p>without having any use statement in my controller.</p>
  
  <p>Now with version 4.0 its a bit different. There is no facebook.php file anymore in the vendors, therefore i dont know what to require now. And API call differs too, it looks like</p>
  
  <pre><code>FacebookSession::setDefaultApplication('YOUR_APP_ID', 'YOUR_APP_SECRET');
  </code></pre>
  
  <p>When i execute that, symfony tells me that it cannot load "FacebookSession" from the global namespace, and if i forget the use statement.</p>
  
  <p>Did anyone have experience how to include the new facebook php sdk in symfony2??</p>