Phonegap Facebook连接插件设置 [英] Phonegap Facebook connect plugin settings
问题描述
我使用phonegap插件连接到Facebook
这一个: https://github.com/phonegap- build / FacebookConnect
我对Facebook应用程序设置感到困惑,当我调用FB.init()时,我收到此错误消息:
应用程序配置不允许指定URL:应用程序设置不允许使用一个或多个给定的URL。它必须与网站网址或Canvas网址匹配,否则网域必须是应用程序域之一的子域。
我使用Facebook登录(网站url)来编辑网站:http:// localhost / space of course我只添加它,因为stackoverflow不允许与'localhost'在它的链接),我等了几分钟(超过一天),它的工作,但它仍然不工作。
$ b $感谢
有几个设置需要设置。
这些设置适用于我的Phonegap Build环境。
本机Android应用下:
- 套件名称 您已在您的config.xml(例如com.aaa.bbb)
- 类名称中添加了.ProjectActivity com.aaa.bbb.ProjectActivity)
- 密钥散列:使用android指令生成密钥散列。 Facebook在 https://developers.facebook上解释了这一点。 com / docs / android / getting-started / facebook-sdk-for-android /
- facebook登录:启用
- 深层链接:已停用
其他步骤:
- 您不需要设置网站与Facebook登录(网站url)到
http:// localhost /
不再。 - 确保沙箱模式已停用
I'm using phonegap plugin to connect to facebook this one : https://github.com/phonegap-build/FacebookConnect
I'm confused about Facebook app settings, when I call FB.init() I get this error message:
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.
I edited Website with Facebook Login (site url) to : http:// localhost/ (without the space ofcourse I only added it because stackoverflow doesn't allow a link with 'localhost' in it) and I waited for several minutes (more than one day) for it to work but it's still not working.
any idea how can I get it to work ?
thanks
There are several settings which you need to set.
These settings worked for me for a Phonegap Build environment.
Under Native Android App:
- package name: the "widget id" you have in your config.xml (e.g. com.aaa.bbb)
- class name: the "widget id" with ".ProjectActivity" appended (e.g. com.aaa.bbb.ProjectActivity)
- key hash: generate the key hash using the android instructions. Facebook explains this at https://developers.facebook.com/docs/android/getting-started/facebook-sdk-for-android/
- facebook login: enabled
- deep linking: disabled
Other steps:
- You don't need to set "Website with Facebook Login (site url) " to
http://localhost/
anymore. If you have a real website (with facebook login), then that's the place to put the real website URL. - Ensure sandbox mode is disabled
这篇关于Phonegap Facebook连接插件设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!