Phonegap Build facebook Connect Plugin (android) -


i have strange problem using facebook plugin phonegap build. sounds certificate problem can't figure out.

i tried sample code found here : github.com/amirudin/pgb-fbconnect

i followed instructions in readme.md file.

when first start android app , when click on "login" button, works fine , can connect myself facebook app.

now, hit logout button. ok again, works.

but if hit login button again, have facebook error message : "invalid android_key_parameter. key xxxxxxxxxxxxxx not match allowed key."

but xxxxxx key in message not correspond key i've put in facebook app config panel.

i have little video of problem here : dropbox video

i don't understand why works fine during first login , fail during second 1 .... seems second time, signature change.

help!!

i created github repo if want test it. have change app_name , app_id in config.xml , app_id in index.html

it's frustrating have "almost" works.

did succeed in reproducing bug/behavior ? (login + logout + login = fail)

the problem facing because of not using right keystore file, signed key, , key algorithm. need generate hash of android key(s) , submit developers page on facebook.

if generating hash on windows (specifically 64 bit versions), please use version 0.9.8e or 0.9.8d of openssl windows , not 0.9.8k.

once download openssl, open command prompt (cmd.exe) administrator, run following command:

keytool -genkey -v -keystore [keystore_name].keystore -alias [alias_name] -keyalg rsa -keysize 2048 -validity 10000 

please note alias_name, , keep passwords andriod

now, go phonegap account >> edit account >> click on signing keys tab >> click 'add key...' , supply following info:

title -  alias - alias_name have given while generating keystore file. 

then, create new hash key using keystore file generated , update hash key in facebook app.

use below command generate hash key.

keytool -exportcert -alias [alias_name] -keystore [keystore_filename.keystore] | openssl sha1 -binary | openssl base64

that should it!


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -