Cordova / Phonegap-facebook-plugin Android:facebookConnectPlugin没有定义 [英] Cordova/Phonegap-facebook-plugin Android: facebookConnectPlugin is not defined

查看:314
本文介绍了Cordova / Phonegap-facebook-plugin Android:facebookConnectPlugin没有定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Android,我一直收到此错误,为此
phonegap-facebook-plugin
https://github.com/Wizcorp/phonegap-facebook-plugin/issues/758

For Android, I keep getting this error, for this phonegap-facebook-plugin https://github.com/Wizcorp/phonegap-facebook-plugin/issues/758

ReferenceError: facebookConnectPlugin is not defined

我已尝试删除所有平台,平台,并只添加这个插件。

I've tried removing all platforms, removing all platforms, and adding just this plugin.

我目前只有这些只有插件安装:
RoverMR:ionic_git_android rover $ cordova插件
com.phonegap .plugins.PushPlugin 2.3.1PushPlugin
com.phonegap.plugins.facebookconnect 0.8.1Facebook Connect
org.apache.cordova.device 0.2.12Device
RoverMR :ionic_git_android rover $

I currently have only these only plugins installed: RoverMR:ionic_git_android rover$ cordova plugin com.phonegap.plugins.PushPlugin 2.3.1 "PushPlugin" com.phonegap.plugins.facebookconnect 0.8.1 "Facebook Connect" org.apache.cordova.device 0.2.12 "Device" RoverMR:ionic_git_android rover$

在我的config.xml中:

In my config.xml:

<feature name="org.apache.cordova.facebook.Connect">
    <param name="android-package" value="org.apache.cordova.facebook.ConnectPlugin" />
</feature>

我的设置:

RoverMR:ionic_git_android rover $ npm --version
1.4.28
RoverMR:ionic_git_android rover $ cordova -v
4.0.0
RoverMR:ionic_git_android rover $ ionic -v
1.2。 8

RoverMR:ionic_git_android rover$ npm --version 1.4.28 RoverMR:ionic_git_android rover$ cordova -v 4.0.0 RoverMR:ionic_git_android rover$ ionic -v 1.2.8

任何想法?

有关Android问题的任何想法吗?对于Android,我一直得到这个:

Any ideas about the Android issue? What other info should I post to resolve this?For Android, I keep getting this:

ReferenceError: facebookConnectPlugin is not defined

我已尝试删除所有平台,删除所有平台,并只添加此插件。

I've tried removing all platforms, removing all platforms, and adding just this plugin.

我目前只安装了这些插件:
RoverMR:ionic_git_android rover $ cordova插件
com.phonegap.plugins.PushPlugin 2.3.1PushPlugin
com.phonegap.plugins.facebookconnect 0.8.1Facebook Connect
org.apache.cordova.device 0.2.12Device
RoverMR:ionic_git_android rover $

I currently have only these only plugins installed: RoverMR:ionic_git_android rover$ cordova plugin com.phonegap.plugins.PushPlugin 2.3.1 "PushPlugin" com.phonegap.plugins.facebookconnect 0.8.1 "Facebook Connect" org.apache.cordova.device 0.2.12 "Device" RoverMR:ionic_git_android rover$

在我的config.xml中:

In my config.xml:

<feature name="org.apache.cordova.facebook.Connect">
    <param name="android-package" value="org.apache.cordova.facebook.ConnectPlugin" />
</feature>

我的设置:

RoverMR:ionic_git_android rover $ npm --version
1.4.28
RoverMR:ionic_git_android rover $ cordova -v
4.0.0
RoverMR:ionic_git_android rover $ ionic -v
1.2。 8

RoverMR:ionic_git_android rover$ npm --version 1.4.28 RoverMR:ionic_git_android rover$ cordova -v 4.0.0 RoverMR:ionic_git_android rover$ ionic -v 1.2.8

任何想法?

有关Android问题的任何想法吗?我还需要发布什么其他信息来解决这个问题?

Any ideas about the Android issue? What other info should I post to resolve this?

推荐答案

SOVLED!问题在Facebook应用程序中缺少KEY HASH(请参阅developer.facebook.com信息中心,Android)

SOVLED! Problem was missing KEY HASH in Facebook App (see developer.facebook.com dashboard, android)

要添加密钥散列,请在您使用的SDK中运行keytool构建/运行应用程序)

To add a key hash, run keytool (in the SDK you're using the build/run the app)

keytool -exportcert -alias androiddebugkey -keystore〜/ .android / debug.keystore | openssl sha1 -binary | openssl base64

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

密码默认似乎是android

password default seems to be "android"

所有其他错误的密码会给你相同的坏键。

All other bad passwords will give you the same bad key.

只有正确的密码会产生不同的好密钥。

Only the correct password will generate a different, good key.

将此键放入FB。

在Native dev中,此错误更加明显。你得到一个FB错误或可以看到错误控制台日志中提到的密钥哈希。这将是很好,如果这个插件可以做同样的。

In Native dev, this error is much more visible. You get a FB error or can see key hash mentioned in error console logs. It'd be nice if this plugin could do the same.

这篇关于Cordova / Phonegap-facebook-plugin Android:facebookConnectPlugin没有定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆