chipcraft Posted December 1, 2016 Share Posted December 1, 2016 In your Facebook App Settings, make sure you have a contact email address under "Settings > Basic", then enable your app in "Status & Review" That will get your customers to the facebook authorize screen, but pressing "Okay" displays the following error "Facebook Social Login Error: Social Login was unable to get your email address Please either sign up normally, use another social provider login or re-enable email authorization for this website" This is the string that gets passed back to my site before failing. login_with_facebook.php?code=AQBIC_5QjXElifxxI0Yl4kWAXBEu30L0AvQa0zCyjWDM6CP-OGcSyt9AL7NiSFDdWh4lQJpcuUnMceXjTBCqYkioyTXHEduYBcK3voLsESkV6aaEKUaaXzSYDTqQUbeGAEIrAvFytnIbobKvMGSKhKCOUWl-eqsZLC1YaOan5xWf53FhEKubdvqAnbEWHK9d3gzFq7LV2CLZw46v2zqOe37aIAcgfn4RPnSKjjx8toP3JWnNWEdNqBbQiVUnzmpxhzDiWaDg94VHOqnGvzDUnVpBT140FRhayXvh9SoXTvmdBtKix6G7VaSCvh36fV0lsR8V4zLuxJfVzvwtFJ1nGxGM&state=1443251028-3599a5#_=_ Anyone know how to fix it? All other providers working fine BIG thanks to stylesoft for this great contribution I get the same thing.... Looks like fb returns some data. however it doesnt seem to parse properly. I'm also using https not http. Has anyone gotten this to work? Looks like its so close to working... Quote Link to comment Share on other sites More sharing options...
jean202 Posted April 28, 2017 Share Posted April 28, 2017 (edited) Hi I try with google. Gender is always unknown. I see 'https://www.googleapis.com/oauth2/v1/userinfo' is deprecated. I have not the acknowledge to change that. Best regards Edited April 28, 2017 by jean202 Quote Link to comment Share on other sites More sharing options...
rudolfl Posted June 13, 2017 Share Posted June 13, 2017 Hi, Current API's (v2.3) is expiring in July. FB suggest moving to 2.9 Are you planning to do so? Thanks, Rudolf Quote Link to comment Share on other sites More sharing options...
frankl Posted June 17, 2017 Share Posted June 17, 2017 @rudolfl I've been playing with this addon to see if I can make it suitable for Edge and to incorporate some improvements. Not sure where that might end up, but in the meantime go to ezsocial/oauth_client.php and change the line $this->dialog_url = 'https://www.facebook.com/dialog/oauth?client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&scope={SCOPE}&state={STATE}'; to $this->dialog_url = 'https://www.facebook.com/v2.9/dialog/oauth?client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&scope={SCOPE}&state={STATE}'; You would also need to change at least one line in login_with_facebook.php, from if(strlen($client->access_token)) { $success = $client->CallAPI( 'https://graph.facebook.com/me', 'GET', array(), array('FailOnAccessError'=>true), $user); } to if(strlen($client->access_token)) { $success = $client->CallAPI( 'https://graph.facebook.com/me?fields=first_name,last_name', 'GET', array(), array('FailOnAccessError'=>true), $user); } to get the user's first name and last name. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
sinopia Posted July 10, 2017 Share Posted July 10, 2017 (edited) I can use Facebook to register, but whenever I try to login with Facebook I get a message what it couldn't get the email. Someone found any solution? The others works fine. oauth_cliente.php $this->oauth_version = '2.9'; $this->dialog_url = 'https://www.facebook.com/v2.9/dialog/oauth?client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&scope={SCOPE}&state={STATE}'; $this->access_token_url = 'https://graph.facebook.com/oauth/access_token'; login_with_facebook.php $client->scope = 'email'; if(($success = $client->Initialize())) { if(($success = $client->Process())) { if(strlen($client->access_token)) { $success = $client->CallAPI( 'https://graph.facebook.com/me', 'GET', array('fields'=>'email,first_name,last_name,gender'), array('FailOnAccessError'=>true), $user); } Edited July 10, 2017 by sinopia Quote Link to comment Share on other sites More sharing options...
sinopia Posted July 10, 2017 Share Posted July 10, 2017 Facebook Social Login Error: Social Login was unable to get your email address Please either sign up normally, use another social provider login or re-enable email authorization for this website Quote Link to comment Share on other sites More sharing options...
frankl Posted July 12, 2017 Share Posted July 12, 2017 @sinopia I will upload a working version for osC 2.34BS next week. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
sinopia Posted July 12, 2017 Share Posted July 12, 2017 @frankl I could set it working -> https://www.phpclasses.org/package/7700-PHP-Authorize-and-access-APIs-using-OAuth.html 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.