有时会发生 Facebook OAuth 验证验证码错误 [英] Facebook OAuth Error validating verification code sometimes happen

查看:56
本文介绍了有时会发生 Facebook OAuth 验证验证码错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在验证 facebook 用户时遇到了一个非常奇怪的问题.基本上它适用于 90% 的用户,但对于 10%,我总是收到错误验证验证码错误".他们尝试从不同的浏览器、操作系统登录,但总是遇到相同的错误.

I have a very strange problem with authenticating facebook users. Basically it works for 90% of users, but for 10% I alwayas get an error " Error validating verification code". They tried to login from different browsers, OS and they always get the same error.

我完全按照书做了:

https://www.facebook.com/dialog/oauth?scope=email%2C+user_birthday%2C+publish_stream%2C+publish_actions%2C+user_hometown&redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fbetchallenge%2F&client_id=.....

然后我从响应中获取一个代码参数并发送新的请求:

Then I grab a code parameter from the response and send new reqest:

https://graph.facebook.com/oauth/access_token?client_secret=...&redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fbetchallenge%2F&code=...&client_id=212564568790055

我遵循了所有规则,redirect_uris 是一样的,它们没有任何特殊字符,如 ?....

I followed all the rules, redirect_uris are the same, they don't have any special characters like ?....

有什么想法吗?

推荐答案

我解决了这个问题.问题在于在其 facebook 帐户中设置通过 HTTPS 连接到 facebook 的用户.在这种情况下,您必须向 facebook 发送 https 请求,而不是 http(尽管在我的示例中它是 https,但实际上我没有使用 https)

I solved the problem. The problem was with users who set in their facebook account to connect to facebook via HTTPS. In that case you have to send https requests to facebook , not http (although in my example it is https, acutally I wasn't using https)

这篇关于有时会发生 Facebook OAuth 验证验证码错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆