在没有https的localhost上登录facebook [英] facebook login on localhost without https
问题描述
我知道在SO上有大约一百个问题,但是它们可能都不是最新的,而与Facebook平台上目前正在发生的事情有关.看来关闭SSL的开关已禁用:
I know there are about a hundred questions of this on SO, but none of them are maybe up-to-date with what seems to be happening on facebook platform right now. It seems the switch that turns off SSL is disabled:
可能很难看到,但是强制HTTPS"切换为灰色,无法切换.我全力支持在生产环境中实施HTTPS,但是为此每个针对facebook API构建的人是否真的为此在本地服务器上设置了SSL证书?
It may be hard to see, but the "Enforce HTTPS" toggle is greyed out and can't be toggled. I'm all for enforcing HTTPS in production, but is everyone who is building against facebook API really setting up an SSL certificate on their local server just for this?
推荐答案
您仍然可以将HTTP与"localhost"地址一起使用,但是 仅当您的应用仍处于开发模式时.
You will still be able to use HTTP with "localhost" addresses, but only while your app is still in development mode.
您可以从应用程序仪表板"将应用程序模式"更改为开发模式":
You can change the App mode to Development Mode from App Dashboard:
在这种模式下,您只能使用Facebook测试用户帐户来测试您的应用程序.您可以从应用程序信息中心获取测试帐户的登录凭据.
In this mode you can only test your application with Facebook test user accounts. You can obtain the test accounts login credentials from your app dashboard.
请注意,仅在开发模式下会自动允许 http://localhost 重定向,而不必在有效的OAuth重定向URI"部分中添加.
Please note, http://localhost redirects are automatically allowed while in development mode only and do NOT need to be added in Valid OAuth Redirect URIs section.
这篇关于在没有https的localhost上登录facebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!