【问题标题】:How to do a connect request for the Facebook App in localhost如何在 localhost 中对 Facebook 应用程序进行连接请求
【发布时间】:2015-04-09 11:50:14
【问题描述】:

我正在为我当前位于 locahost 中的应用程序创建一个使用 facebook 身份验证的登录名。我在 facebook 中创建了一个应用程序。

现在当我尝试访问这个 URL 时:https://www.facebook.com/dialog/oauth?client_id=my_app_id&redirect_uri=http://localhost:8080/

我收到此错误:

Given URL is not permitted 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.

然后我尝试将localhost添加到我的应用设置App Domains,但我又收到了另一个错误,无法保存:

This must be derived from Secure Canvas URL, Unity Binary URL, Site URL, Mobile Site URL or Secure Page Tab URL. Check and correct the following domains: localhost

我做错了吗?或者为 localhost 做这件事的正确方法是什么?

【问题讨论】:

  • 那么,消息中提到的任何 URL 是否以 http(s)://localhost ... 开头?
  • 我尝试了类似的方法:https://locahost,但仍然遇到同样的错误。
  • 在哪里您尝试输入该值?
  • App Domains 字段中
  • https://localhost 不是有效的 ,它是一个 URL(因此不属于该字段)。只有localhost 是此处的域名——正如消息已经说过的,它必须匹配您输入到其中一个其他中的URL i> 提到的字段。

标签: php facebook laravel facebook-apps


【解决方案1】:

您需要先在应用设置中添加一个“平台”。

添加平台“网站”,并输入http://localhost/作为网站URL。只有在此之后,您才能从 localhost 网站调用登录对话框。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-21
    • 2011-02-13
    • 2012-11-01
    • 1970-01-01
    • 2011-12-24
    • 2014-08-20
    • 1970-01-01
    相关资源
    最近更新 更多