Facebook php sdk 50 :Facebook SDK returned an error: Cross-site request forgery validation failed. Required param “state” missing.

解法:

參考:

https://github.com/facebook/facebook-php-sdk-v4/issues/473
https://github.com/facebook/facebook-php-sdk-v4/blob/4.0.16/src/Facebook/FacebookRedirectLoginHelper.php#L205
https://github.com/facebook/facebook-php-sdk-v4/issues/470#issuecomment-212561488
https://github.com/facebook/facebook-php-sdk-v4/issues/572
https://github.com/facebook/facebook-php-sdk-v4/issues/470
https://github.com/facebook/facebook-php-sdk-v4/issues/529