title: fb login error - CSRF state token does not match one provided
body: <p>i am using facebook login on my website</p>
  
  <p>downloaded facebook php sdk source from <a href="https://github.com/facebook/facebook-php-sdk" rel="nofollow">https://github.com/facebook/facebook-php-sdk</a></p>
  
  <p>for facebook login, followed steps given at <a href="http://25labs.com/tutorial-integrate-facebook-connect-to-your-website-using-php-sdk-v-3-x-x-which-uses-graph-api/" rel="nofollow">http://25labs.com/tutorial-integrate-facebook-connect-to-your-website-using-php-sdk-v-3-x-x-which-uses-graph-api/</a></p>
  
  <p>on first instance it never logs in, only able to login through facebook after 2 attempts. CSRF error shows up everytime i try to login.</p>
  
  <p>on digging in the code(base_facebook.php) further, came to know that on first login instance: <code>$this-&gt;state</code> is not equal to <code>$server_info['state']</code>, hence the CSRF error.</p>
  
  <p>tried to find a solution to this error browsing through various posts, however, no success. please suggest a solution. thanks</p>