title: Login with Facebook in Laravel 4
body: <p>All I'm trying to do is have the user connect with facebook, grab his information (email, name, profile_pic) and register him automatically on my site.</p>
  
  <p>the problem is when I visit /user/login/fb/ I get redirected to the fb application to grant permission and then it redirects me to</p>
  
  <blockquote>
    <p><a href="http://local.serv/user/login/fb/callback?code=AQB7Uf7pcZSY89WYUKofY8bOgBY1qCcWA5p6_G-9MVdczN60C0TNOgFIi9LBRwquagZ6VbC6_kjD9-D0ZevKHyNGw88LuRJcuqdq2RbwCKNlC02_4eMtiNAWxX76XHm1CzU0F7nSVQ4KxENoDPFpKIs1oV-wQTkO7YuuGznL9UuzfK-hqTtZAIRBvQ_N_yh03LsdgaZ9-f6z5yc5FGnJ3sJyrC-3DGrjkSzhPpJHHk5tr7LorzqW9TNcaFpB9eE51wdsEHOa5oNEWycwzXjY-7Me1Uod3KVBGpb8tzeYVHArphMc2n45IF1pfAWMZZZ51Dw&amp;state=f25e8641df013970542b7463b8899ccf#=" rel="nofollow">http://local.serv/user/login/fb/callback?code=AQB7Uf7pcZSY89WYUKofY8bOgBY1qCcWA5p6_G-9MVdczN60C0TNOgFIi9LBRwquagZ6VbC6_kjD9-D0ZevKHyNGw88LuRJcuqdq2RbwCKNlC02_4eMtiNAWxX76XHm1CzU0F7nSVQ4KxENoDPFpKIs1oV-wQTkO7YuuGznL9UuzfK-hqTtZAIRBvQ_N_yh03LsdgaZ9-f6z5yc5FGnJ3sJyrC-3DGrjkSzhPpJHHk5tr7LorzqW9TNcaFpB9eE51wdsEHOa5oNEWycwzXjY-7Me1Uod3KVBGpb8tzeYVHArphMc2n45IF1pfAWMZZZ51Dw&amp;state=f25e8641df013970542b7463b8899ccf#=</a></p>
  </blockquote>
  
  <p>and give me this error</p>
  
  <pre><code>Facebook \ FacebookSDKException (700) 
  You must provide or set a default application id.
  </code></pre>
  
  <p>Here are my routes</p>
  
  <pre><code>Route::get('user/login/fb', function() {
  
      FacebookSession::setDefaultApplication('', '');
      $helper = new FacebookRedirectLoginHelper('user/login/fb/callback');
      $loginUrl = $helper-&gt;getLoginUrl();
      return "&lt;a href='$loginUrl'&gt;facebook&lt;/a&gt;";
  });
  
  Route::get('user/login/fb/callback', function() {
      // A FacebookResponse is returned from an executed FacebookRequest
      $helper = new FacebookRedirectLoginHelper('user/login/fb/callback');
      $session = $helper-&gt;getSessionFromRedirect();
      $request = new FacebookRequest($session, 'GET', '/me');
  
      try {
          $response = $request-&gt;execute();
          $me = $response-&gt;getGraphObject();
      } catch (FacebookRequestException $ex) {
          echo $ex-&gt;getMessage();
      } catch (\Exception $ex) {
          echo $ex-&gt;getMessage();
      }
  
      print_r($me);//-&gt;getProperty("id"));
  
      $user = new Giftee;
          $user-&gt;name    = $me-&gt;getProperty('first_name') . ' ' . $me-&gt;getProperty('last_name');
          $user-&gt;email    = $me-&gt;getProperty('email');
          $user-&gt;photo    = 'http://graph.facebook.com' . $me-&gt;getProperty('id') . '/picture?type=large';
  
          $user-&gt;save();
  
  });
  </code></pre>
  
  <p>PS: if you have a clear tutorial with views and everything on how to integrate fb login with laravel please do share, I've been looking for days, the material is so limited.</p>