facebookarchive / php-graph-sdk

The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login. https://developers.facebook.com/docs/php
Other
3.18k stars 1.96k forks source link

Facebook Login example = error 500 #1243

Open Clemweb opened 3 years ago

Clemweb commented 3 years ago

Hello,

I copy / past the exact same code from this doc for Facebook Login but when I came back on callback.php I get 500 error ?!

After research I found that in FacebookRedirectLoginHelper.php on line 242 $savedState is NULL and throw new FacebookSDKException('Cross-site request forgery validation failed. Required param "state" missing from persistent data.'); return 500 error

Is this sdk is working ??

Thanks for help

rajatvarlani commented 3 years ago

You can check the software at the link https://wordpress.org/plugins/super-socializer, if you want to integrate Facebook login with your website.