Dayo Posted March 2, 2020 Share Posted March 2, 2020 (edited) Common Question Coming Soon ... Edited March 2, 2020 by Dayo 1 Quote Link to comment Share on other sites More sharing options...
Eurogangster Posted March 5, 2020 Share Posted March 5, 2020 i have an error in fb. When someone signs up with facebook everything works perfect, but the next time that visits the site and want to login when he clicks the login with facebook he receives this message: Facebook SDK returned an error: Cross-site request forgery validation failed. Required param "state" missing from persistent data. I have found the issue and fixed it Quote Link to comment Share on other sites More sharing options...
Tom V Posted March 6, 2020 Share Posted March 6, 2020 I tested and found it works for new users that agree to share email address. However, there seems to be a problem for existing users to sign-in, fb returns you to page "?page=facebook#_=_" and the following error "To finish off your registration please enter a username and a new password!". How do we get an existing user's info into the facebookLogins table? Quote Link to comment Share on other sites More sharing options...
Curt Posted March 6, 2020 Share Posted March 6, 2020 (edited) if the current user is using the same email with your game and facebook then its simple..if not you have to create a scenario that fits. Such as option to link current account with facebook once they login the old way. I went the simple route for now because I was simply happy I got it working.. If player email matches facebook email -> log them into existing account if not -. Creates a new account. Random name/pass generated and emailed to player and then logs them directly in. Edited March 6, 2020 by Curt 2 Quote Link to comment Share on other sites More sharing options...
Dayo Posted March 7, 2020 Author Share Posted March 7, 2020 On 3/5/2020 at 5:49 PM, Eurogangster said: i have an error in fb. When someone signs up with facebook everything works perfect, but the next time that visits the site and want to login when he clicks the login with facebook he receives this message: Facebook SDK returned an error: Cross-site request forgery validation failed. Required param "state" missing from persistent data. I have found the issue and fixed it Care to share your fix so that I can update the code to prevent this happening to other users? Quote Link to comment Share on other sites More sharing options...
Eurogangster Posted March 7, 2020 Share Posted March 7, 2020 Login Fix 1. Edit your facebook.inc.php 2. Find : $helper = $fb->getRedirectLoginHelper(); 3. Under add this lines : if (isset($_GET['state'])) { $helper->getPersistentDataHandler()->set('state', $_GET['state']); } And Voila everything works 😛 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.