0
votes

We've been attempting to test the FacebookConnect plugin on iOS7 and Android using Phonegap Build and have run into some difficulties. The remote iOS7 build works fine. I've followed the Android steps at the FaceBookConnect ReadMe and have managed to get the local Android build working. We've tried to setup the remote Android Phonegap build, but everytime we are running into the following error message.

Error
Invalid android_key parameter. The key XXXXXXXXXXXXXXXXXXX-YYYY does not match
any allowed key. Configure your app key hashes at 
http://developers.facebook.com/apps/xxxxxxxxxxxxxx

I'm assuming that there is a problem the Facebook Android Platform settings that we are using.

Local Build Settings (These Worked)
Package Name: Widget Id (Package name in the Eclipse project)
Class Name: package_name.main_activity_filename
Key Hashes: Generated using keytool
Single Sign On: Yes
Deep Linking: No

Remote Build Settings
Package Name: Widget Id
Class Name: package_name.config_name_tag
Key Hashes: Generated using keytool
Single Sign On: Yes
Deep Linking: No

Key Hash is generated using the following command.

 keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64

The openssl points to a directory for the version openssl-0.9.8e_X64.

I've tried adding the hash key dispayed in the error message, but it still doesn't work. I'm wondering if it's a case of not using the latest version of Java, or if there's something wrong with the client side js code.

Are the remote build settings correct?

1
I'm guessing that the problem has to do with using a debug key versus a release key, where the debug key is machine specific and is generated on my PC versus the actual phone that is being tested on. - shmattman

1 Answers

3
votes

Solved on my own. You can't use a debug key, but need to generate a release key and attach the keystore to build.phonegap.com build for android. Steps for getting the release key are here.