title: How to set up laravel 5 with facebook
body: <p>How to set up login with facebook with Laravel 5 I installed php-sdk-v4 and tried something like this:</p>
  
  <pre><code>&lt;?php namespace App\Http\Controllers;
  
  use App\Http\Requests;
  use App\Http\Controllers\Controller;
  use Illuminate\Support\Facades\Redirect;
  use Illuminate\Http\Request;
  use FacebookHelper;
  use Illuminate\Support\Facades\Config;
  use Facebook\FacebookSession;
  use Facebook\FacebookRedirectLoginHelper;
  
  class LoginFacebookController extends Controller {
          private $helper;
          public function  _construct(){
              FacebookSession::setDefaultApplication(Config::get('facebook.app_id'), Config::get('facebook.app_secret'));
              $this-&gt; helper = new FacebookRedirectLoginHelper(url('login/fb/callback'));
  
          }
  
          public function getUrlLogin(){
  
              return $this -&gt; helper-&gt;getLoginUrl(Config::get('facebook.app_scope'));
          }
  
      public function login(){
  
              return Redirect::to(self::getUrlLogin());
          }
  
  
  
          public function callback(){
  
              dd(Input::all());
          }
  }
  </code></pre>
  
  <p>But get this error:</p>
  
  <p>FatalErrorException in LoginFacebookController.php line 23:
  Call to a member function getLoginUrl() on a non-object</p>
  
  <p>Any solution?</p>