1. Create an application in Facebook
2. Settings > Add Platform > Android
3. Class Name = com.ansca.corona.CoronaActivity
1. Open Terminal(Mac)/ Command Prompt (Windows).
2. CD to the location of keytool.
(Windows : Find out the location of keytool.exe. If you can’t find in Java installation directory, you may download it.)
3. This command will generate a Keystore file.
keytool -genkey -v -keystore [The location where you want to save the keystore file/filename.keystore] -alias [Give a Name according to choice] -keyalg RSA -keysize 2048 -validity 10000
A sample command is as follows
keytool -genkey -v -keystore /WorkSpace/shobdokolpodroom.keystore -alias Shobdokolpodroom -keyalg RSA -keysize 2048 -validity 10000
Upon execution, it will ask for a password(Enter a password and remember it. You will need it later). It will also ask for some informations. Provide those.
If you do all those stuffs correctly, you will find a new file in the directory you provided in command.
Stay in Terminal/Command Prompt
1. The command to generate Keyhash is as follows
keytool -exportcert -alias [Alias name you gave in command to create keystore]-keystore [location of generated keystore] | openssl sha1 -binary | openssl base64
A sample command is
keytool -exportcert -alias Shobdokolpodroom -keystore /WorkSpace/shobdokolpodroom.keystore | openssl sha1 -binary | openssl base64
Upon execution, it will ask the password of the Keystore (The one you entered while creating the keystore)
After providing correct password, it will return a String like it “darobDJIMMcUoraBOztnmxDtghM=”. It should contain a ‘=’ sign at the end.
This string is your desired keyhash. Put it in facebook app.