简体   繁体   中英

OAuth redirect_uri opencart by facebook sdk4

am New to opencart 1.5.5.1 almost did all configuration to make the site have login facebook but no use.

Graph returned an error: Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request

I tried to play with url from my side nothing work as checked on internet like add slash after the link and so on

this is the requested site

https://www.facebook.com/v2.4/dialog/oauth?client_id=4444&state=444444&response_type=code&sdk=php-sdk-5.0.0&redirect_uri=http%3A%2F%2Flocalhost%2Fmarkaforyou%2Fwholesale%2F%3Froute%3Dfacebook%2Ffacebook&scope=email%2Cuser_birthday%2Cuser_location%2Cuser_hometown

this url redirected to my site

http://localhost/markaforyou/wholesale/?route=facebook%2Ffacebook&code=AQAB3eJHlzqyopMX0SSxRvChkEmoRE6LtQfghd54634645vb6ybhfgbhfghdfghjfdgh fgZAZdYe4ivu94IsPf36hrpyfq3K4uyi7dx50&state=69e8f620cdbcdfdf43185fba9b70dc43# =

is there any thing I must need to do in configuration

it was a problem with facebook sdk url clearer in the FacebookRedirectLoginHelper.php change the line

$redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state']);

with

$redirectUrl = substr($redirectUrl, 0, strpos($redirectUrl, '&state'));

and all thing work perfectly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM