如何将localhost:3000添加到Facebook App进行开发 [英] How can I add localhost:3000 to Facebook App for development

查看:181
本文介绍了如何将localhost:3000添加到Facebook App进行开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Rails 4应用程序。在我的笔记本电脑上,开发在 localhost:3000 下完成。该网站的实际域是 roomidex.com



如何设置一个Facebook应用程序,以便它工作生产和开发?



以下是当前配置:

 应用程序域名:roomidex.com 

网站与Facebook登录:
网站URL:http://www.roomidex.com

当我尝试在localhost上执行Facebook登录时:3000,我得到这并不奇怪的错误:

  {
error:{
message:无效的redirect_uri:应用程序配置不允许给定的URL,
type OAuthException,
code:191
}
}


解决方案

在Facebook应用页面上,点击编辑应用,然后点击左侧导航栏中的高级。然后对于有效的OAuth重定向URI,添加 http:// localhost:3000 ...或任何您想要接受的重定向。


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.

How can I set up a Facebook app so it works on production and development?

Here is the current configuration:

App Domains: roomidex.com

Website With Facebook Login: 
Site URL: http://www.roomidex.com

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
   }
}

解决方案

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屋!

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