Phonegap Facebook连接插件设置 [英] Phonegap Facebook connect plugin settings
问题描述
我正在使用phonegap插件连接到Facebook
这一个: https:// github .com / phonegap-build / FacebookConnect
I'm using phonegap plugin to connect to facebook this one : https://github.com/phonegap-build/FacebookConnect
我对Facebook应用设置感到困惑,当我调用FB.init()时,我收到此错误消息:
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.
我用Facebook登录(网站url)将网站编辑为:http:// localhost /(without空间,我只是添加它,因为stackoverflow不允许与其中的'localhost'链接),我等待了几分钟(超过一天),它的工作,但仍然不起作用。
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 ?
谢谢
推荐答案
您需要设置几个设置。
这些设置适用于我的Phonegap Build环境。
There are several settings which you need to set.
These settings worked for me for a Phonegap Build environment.
Under Native Android App :
- 包名称: 你有你的config.xml(例如com.aaa.bbb)
- 类名:附加了.ProjectActivity的widget id com.aaa.bbb.ProjectActivity)
- 密钥哈希:使用android指令生成密钥哈希。 Facebook在 https://developers.facebook上解释这一点。 com / docs / android / get-started / facebook-sdk-for-android /
- facebook登录:启用
- 深层链接禁用
- 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
其他步骤:
- 您不需要将网站与Facebook登录(网站网址)设置为
http:// localhost /
了吧如果你有一个真实的网站(与Facebook登录),那就是放置真实网站URL的地方。 - 确保沙箱模式被禁用
- 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屋!