[英]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. 我是opencart的新手1.5.5.1差不多做了所有配置,使网站登录facebook但没有用。
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 我尝试从我身边玩url没有任何工作,如在互联网上检查,如链接后添加斜杠等等
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
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&范围=电子邮件%2Cuser_birthday%2Cuser_location%2Cuser_hometown
this url redirected to my site 此网址重定向到我的网站
http://localhost/markaforyou/wholesale/?route=facebook%2Ffacebook&code=AQAB3eJHlzqyopMX0SSxRvChkEmoRE6LtQfghd54634645vb6ybhfgbhfghdfghjfdgh fgZAZdYe4ivu94IsPf36hrpyfq3K4uyi7dx50&state=69e8f620cdbcdfdf43185fba9b70dc43# =
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 这是facebook sdk url更清楚的问题在FacebookRedirectLoginHelper.php更改行
$redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state']); $ redirectUrl = FacebookUrlManipulator :: removeParamsFromUrl($ redirectUrl,['state']);
with 同
$redirectUrl = substr($redirectUrl, 0, strpos($redirectUrl, '&state')); $ redirectUrl = substr($ redirectUrl,0,strpos($ redirectUrl,'&state'));
and all thing work perfectly 一切都很完美
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.