FACEBOOK SDK AND GOOGLE PLAYSTORE API - KEYSTORES

Hello,

Before i add Facebook SDK to my project, i added Google PlayStore Game services to my project and as you all know, before you upload the .apk file to playstore, you have to create a keystore file from player setting menu. (Google Play Services work perfectly)I did all and after then i add facebook game services such as leaderboard and share etc. FB Game service uses a debug.keystore file(which is created by eclipse and facebook game services call this) and uses key hash of it to run the facebook services. But i already have a keystore file(which i created for google playstore) and it doesn’t let me to use facebook services. I don’t know what to do about that, i tried many many ways but, i failed at all. Waiting for you great answers about it. :slight_smile: Thanks.

Don’t use the debug keystore. Use the Google Play Store one (release). You need to add the key hash to your app on the developer website. Add the key hash under Settings > Android > Key Hashes.

You can use the keytool utility to generate a key hash from your keystore. Instructions taken from Facebook’s Android documentation:

On OS X, run:

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

On Windows, use:

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