如何将 localhost:3000 添加到 Facebook App 进行开发 [英] How can I add localhost:3000 to Facebook App for development
问题描述
我正在开发一个 Rails 4 应用程序.在我的笔记本电脑上,开发是在 localhost:3000
完成的.该网站的实际域名是 roomidex.com
.
I am working on a Rails 4 app. On my laptop, development is done at localhost:3000
. The actual domain of the site is roomidex.com
.
如何设置 Facebook 应用以使其适用于生产和开发?
How can I set up a Facebook app so it works on production and development?
这是当前配置:
App Domains: roomidex.com
Website With Facebook Login:
Site URL: http://www.roomidex.com
当我尝试在 localhost:3000 上登录 Facebook 时,出现了这个并不奇怪的错误:
When I try to do a Facebook login on localhost:3000, I get this not surprising error:
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}
推荐答案
在 Facebook 应用页面上,单击编辑应用",然后单击左侧导航中的高级".然后为有效的 OAuth 重定向 URI"添加 http://localhost:3000
... 或您希望接受的重定向的任何内容.
On the Facebook App page, click "edit App" then click "Advanced" in the left-hand navigation. Then for "Valid OAuth redirect URIs" add http://localhost:3000
... or whatever you want the accepted redirect to be.
这篇关于如何将 localhost:3000 添加到 Facebook App 进行开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!