title: Facebook Graph API doesn't "login" the way it should
body: <p>I am working with Facebook's Graph API.</p>
  
  <p>I can't seem to figure out what I'm doing wrong, I can't seem to get the login_url() to work correctly.</p>
  
  <p>I'm requiring the Facebook SDK correctly (definitely)</p>
  
  <p>Underneath my require I have this:</p>
  
  <pre><code>use Facebook\FacebookSession;
  use Facebook\FacebookRequest;
  use Facebook\GraphUser;
  use Facebook\FacebookRequestException;
  use Facebook\FacebookRedirectLoginHelper;
  </code></pre>
  
  <p>Those should be enough for just logging a user in.</p>
  
  <p>Next I set the default app with the correct APP ID and APP Secret (Hidden for obvious reasons)</p>
  
  <pre><code>FacebookSession::setDefaultApplication('xxx', 'yyyy');
  </code></pre>
  
  <p>I create my helper for my facebook login and set the redirect URL (site hidden for my privacy)</p>
  
  <pre><code>$helper = new FacebookRedirectLoginHelper('http://siteurl.com/dashboard');
  </code></pre>
  
  <p>Dashboard refers to the index.php?a=dashboard (htaccess rewrite rules)</p>
  
  <p>I try to set the $session variable from the redirect (the get parameter 'code' does exist, however, I do not get redirected to Facebook to approve the app)</p>
  
  <pre><code>try {
      $session = $helper-&gt;getSessionFromRedirect();
  } catch(FacebookRequestException $ex) {
       echo $ex;
  } catch(\Exception $ex) {
      echo $ex;
  }
  </code></pre>
  
  <p>No exceptions are outputted.</p>
  
  <p>My IF statement to check whether or not the session exists, the else statement is always called.</p>
  
  <pre><code>if ($session) {
    echo 'test';
  } else {
      $loginUrl = $helper-&gt;getLoginUrl();
      ?&gt;
      &lt;a href="&lt;?=$loginUrl;?&gt;"&gt;&lt;img src="/images/fb-login.png"&gt;&lt;/a&gt;
      &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p>I have tried this with both my live app and the test version of my app.</p>
  
  <p>I hope I haven't duplicated an existing thread because I did do a general search.</p>
  
  <p>Please feel free to ask me any questions and thank you for taking the time to assist me.</p>