3

我在 nitrous.io 上的 node.js 机器上运行了一个流星应用程序,并且 facebook 身份验证不起作用。我在 facebook 中创建了一个新应用程序,添加网站作为平台,将应用程序域设置为 machinename.usw1.nitrousbox.com 并将网站的站点 URL 设置为http://machinename.usw1.nitrousbox.com(机器名是虚构的,但我那里有我自己的网站)然后我使用公钥和密钥在运行流星应用程序中设置 fb auth。这与我之前设置应用程序的方式相似,但是当我尝试使用 fb 登录到这个 nitrous.io 应用程序时,我从 facebook 得到这个:

    Given URL is not allowed by the Application configuration.: One or more of
    the given URLs is not allowed by the App's settings. It must match the
    Website URL or Canvas URL, or the domain must be a subdomain of one of the
    App's domains.

我尝试了所有不同类型的设置。有任何想法吗?

4

1 回答 1

2

有两种方法可以解决这个问题。

选项1:

Meteor 查找 ROOT_URL 环境变量来确定应用程序正在运行的 url,这是http://localhost:3000/默认情况下的。您可以保持设置不变,但您需要在您的 facebook 应用配置中使用以下凭据:

网站网址:http://localhost:3000/

选项 2

如果你想使用你的预览 URL,那么你需要site_url在你的 facebook 应用配置中设置它:

网站网址:http://machinename.usw1-2.nitrousbox.com

下一步将使用以下命令启动 Meteor:

$ ROOT_URL=http://machinename.usw1-2.nitrousbox.com meteor

或者,您可以按照Meteor 文档更改您的根 URL。

于 2014-03-28T00:29:10.197 回答