Facebook sdk4的OAuth redirect_uri opencart

时间:2016-05-22 12:16:20

标签: php facebook oauth opencart facebook-php-sdk

am 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

我试图在我身边玩url没有任何工作在互联网上检查,如链接后添加斜杠等等

这是请求的网站

  

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

此网址已重定向到我的网站

  

http://localhost/markaforyou/wholesale/?route=facebook%2Ffacebook&code=AQAB3eJHlzqyopMX0SSxRvChkEmoRE6LtQfghd54634645vb6ybhfgbhfghdfghjfdgh   fgZAZdYe4ivu94IsPf36hrpyfq3K4uyi7dx50&安培;状态= 69e8f620cdbcdfdf43185fba9b70dc43# =

在配置

中我是否需要做任何事情

1 个答案:

答案 0 :(得分:0)

这是facebook sdk url更清楚的问题 在FacebookRedirectLoginHelper.php中 改变行

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

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

所有事情都很完美