【问题标题】:Phonegap Facebook connect plugin settingsPhonegap Facebook 连接插件设置
【发布时间】:2013-05-26 12:12:36
【问题描述】:

我正在使用 phonegap 插件连接到 facebook 这个:https://github.com/phonegap-build/FacebookConnect

我对 Facebook 应用程序设置感到困惑,当我调用 FB.init() 时收到以下错误消息:

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. 

我用 Facebook 登录(网站 url)编辑网站到:http://localhost/(没有空格我只添加它,因为 stackoverflow 不允许其中包含 'localhost' 的链接),我等了几个分钟(超过一天)让它工作,但它仍然不工作。

知道如何让它工作吗?

谢谢

【问题讨论】:

标签: javascript facebook facebook-javascript-sdk cordova


【解决方案1】:

您需要设置几个设置。
这些设置适用于 Phonegap Build 环境。

在原生 Android 应用下:

其他步骤:

  • 您不再需要将“使用 Facebook 登录的网站(站点 url)”设置为 http://localhost/。如果您有一个真实的网站(使用 facebook 登录),那么这就是放置真实网站 URL 的地方。
  • 确保沙盒模式已禁用

【讨论】:

  • 嗨。谢谢我已经完成了所有这些,但它仍然无法正常工作。你能帮忙吗?你认为这可能与 .ProjectActivity 有关吗,因为我有一个主 index.html。
【解决方案2】:
 Write this code in onDeviceReady after creating your application id on facebook


 FB.init({
            appId: "<your appId>",
            nativeInterface: CDV.FB
 });

【讨论】:

    【解决方案3】:

    在 facebook 上输入您的应用设置 将您的“使用 Facebook 登录的网站”设置为

    http://localhost/
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多