所以我没主意了,我不知道要检查或调试什么了,但是在异常情况下我得到了这个:
string(188203) "Facebook\FacebookAuthorizationException Object
(
[statusCode:Facebook\FacebookRequestException:private] => 400
[rawResponse:Facebook\FacebookRequestException:private] => {"error":{"message":"Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request","type":"OAuthException","code":100,"fbtrace_id":"DqCCKoiN0r4"}}
[responseData:Facebook\FacebookRequestException:private] => Array
(
[error] => Array
(
[message] => Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request
[type] => OAuthException
[code] => 100
[fbtrace_id] => DqCCKoiN0r4
)
)
[message:protected] => Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request
[string:Exception:private] =>
[code:protected] => 100
最佳答案
您可以在中设置重定向 URI 转到 https://developers.facebook.com/apps 选择您的应用。
在“产品”>“Facebook 登录”>“设置”下
- 启用嵌入式浏览器 OAuth 登录
- 设置有效的 OAuth 重定向 URI
您可以使用重定向 URI 验证程序验证重定向 URI。
您只能使用 https URI。 同时在设置 > 基本 > 应用域中设置应用域
在重定向 URI 的末尾尝试 /
在我的例子中,我到处都在使用 https://localhost
,但在获取指定 https://localhost/
的访问 token 时不知何故有效。
关于javascript - Facebook 登录 : Please make sure your redirect_uri is identical to the one you used in the OAuth dialog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38477149/