title: SDK Error The "state" param from the URL and session do not match
body: <p>I am use this code from Facebook</p>
  
  <p><a href="https://developers.facebook.com/docs/php/gettingstarted/5.0.0" rel="nofollow">https://developers.facebook.com/docs/php/gettingstarted/5.0.0</a></p>
  
  <p>But now its show <code>Facebook SDK returned an error: Cross-site request forgery validation failed. The "state" param from the URL and session do not match.</code> </p>
  
  <p>I cant understand whats wrong </p>
  
  <p>my login callback page code</p>
  
  <pre><code>session_start();
  require_once __DIR__ . '/facebook-php-sdk-v4-5.0-dev/src/Facebook/autoload.php';
  $fb = new Facebook\Facebook([
    'app_id' =&gt; 'xxxx',
    'app_secret' =&gt; 'xxxxxxxx',
    'default_graph_version' =&gt; 'v2.2',
    ]);
  
  $helper = $fb-&gt;getRedirectLoginHelper();
  
  
  try {
    $accessToken = $helper-&gt;getAccessToken();
  } catch(Facebook\Exceptions\FacebookResponseException $e) {
    // When Graph returns an error
    echo 'Graph returned an error: ' . $e-&gt;getMessage();
    exit;
  } catch(Facebook\Exceptions\FacebookSDKException $e) {
    // When validation fails or other local issues
    echo 'Facebook SDK returned an error: ' . $e-&gt;getMessage();
    exit;
  }
  
  if (isset($accessToken)) {
    // Logged in!
    $_SESSION['facebook_access_token'] = (string) $accessToken;
  
    // Now you can redirect to another page and use the
    // access token from $_SESSION['facebook_access_token']
  
    $_SESSION['facebook_access_token'];
  }
  </code></pre>