Facebook CodeIgniter - can't log in on first attempt
===

I'm using the Facebook PHP integration with CodeIgniter.
I have a problem where I click on the login link, it brings me to the Facebook login, I log in successfully, and when it redirects back to my page, none of the Facebook information has come through. Then if I click the login link again, it immediately logs me in without the need for the Facebook login form. If I were to refresh the page instead of clicking the login link the second time, the Facebook information still wouldn't show.

I feel that it's something to do with the session.

    $facebook = $this->facebook;
    $user = $facebook->getUser();
        
*$user* is always 0 until I click the login link for the second time.
This is the login flow:![enter image description here][1]<br />
I feel as if it's failing at the *GET /oath/authorize* phase.

  [1]: http://i.stack.imgur.com/MJ6uI.jpg