【问题标题】:Facebook integration in cross-platform mobile appsFacebook 在跨平台移动应用程序中的集成
【发布时间】:2015-05-02 01:40:52
【问题描述】:

我正在使用 Parse for JavaScript,并且正在使用英特尔 XDK 中的 ionic 框架。

我正在尝试合并社交媒体登录,用户可以在其中使用 facebook 登录。

我通常知道如何导航,但我主要关心的是以下几点: 我正在将 facebook 用于需要 URL 的 javascript,当该 URL 无法访问时,它就不起作用。因此,在 iphone 或 android 上我还不能使用 facebook。

我得到的具体错误如下:

Warning
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.

到目前为止我做了什么? 我彻底阅读了以下指南: http://www.benjamin.my/how-to-set-up-facebook-connect-plugin-and-parse-com-in-ionic-phonegap/

在指南的结尾处确实提到了

You may have to add an iOS setting or Android setting too eventually when you deploy to either platform.

这是我遇到问题的部分,并且有一段时间。

【问题讨论】:

    标签: javascript android html facebook parse-platform


    【解决方案1】:

    您是否在 config.xml 中设置了 <access origin="*" /> 以便可以访问所有外部域?

    有关该主题的更多信息,请参阅the cordova whitelist guide

    【讨论】:

    • 感谢您的及时回复。你能详细说明你的反应吗?我应该在 facebook 应用程序上为 javascript 设置的域名是什么,并且每个平台都有一个配置版本(config.android、config.ios、config.windows),那么应该如何将其添加到所有平台。谢谢
    • 您应该在主config.xml(在项目文件夹中)中进行,这样它将被带到所有平台。您需要将您的应用需要访问的所有 URL 列入白名单,使用星号将所有 URL 列入白名单(允许您的应用与任何 URL 通信)。
    • 抱歉这么新手,但在 facebook 应用程序页面上,在网站和移动 url 中,我想我还需要将 URL 列入白名单。我该怎么做,只是输入 * 不是有效的 url。谢谢
    • 它似乎只在移动设备上工作,但我遇到的一个问题是它绕过了登录页面,无论以前的 Facebook 帐户是否打开,都会转到下一页跨度>
    • @user3907211 - facebook 应用页面是什么意思;在编程中经常使用星号来定义“全部”。
    猜你喜欢
    • 1970-01-01
    • 2010-11-10
    • 2011-09-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-13
    • 1970-01-01
    相关资源
    最近更新 更多