# Android debug Facebook key hash automation?

**URL:** <https://discuss.bitrise.io/t/android-debug-facebook-key-hash-automation/3552>\
**Category:** Question & Answer\
**Created:** [December 18, 2017, 11:44pm UTC](https://discuss.bitrise.io/t/android-debug-facebook-key-hash-automation/3552 "2017-12-18T23:44:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Development\_Vampr](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Development\_Vampr](https://discuss.bitrise.io/u/Development_Vampr)\
**Post date:** [December 18, 2017, 11:44pm UTC](https://discuss.bitrise.io/t/android-debug-facebook-key-hash-automation/3552/1 "2017-12-18T23:44:37Z")

</div>

Currently I use the following manual process to get the new Key Hash for my debug builds from Bitrise:

1. Download APK
2. Open Terminal to directory with downloaded APK
3. keytool -list -printcert -jarfile app-debug.apk
4. Copy the SHA1 fingerprint (e.g. CD:A1:EA:A3:5C:5C:68:FB:FA:0A:6B:E5:5A:72:64:DD:26:8D:44:84)
5. Past the SHA1 fingerprint in this online [Hex to base64 tool](http://tomeko.net/online_tools/hex_to_base64.php)
6. Click ‘Convert’
7. Copy the ‘Output (base64)’ value (e.g. \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*=)
8. Past the base64 value into the app Facebook Settings page
9. Click ‘Save’

This then allows the debug build to work. My question is this. Is there a better/automated way to do this?

---

<div class="post-metadata">

**Author:** ![godreikrisztian](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/godreikrisztian/32/22_2.png) [@godreikrisztian](https://discuss.bitrise.io/u/godreikrisztian)\
**Post date:** [December 21, 2017, 9:34am UTC](https://discuss.bitrise.io/t/android-debug-facebook-key-hash-automation/3552/2 "2017-12-21T09:34:43Z")

</div>

Hi @Development_Vampr,  
thanks for the question.

If you would sign your apk with your release keystore (instead of generating debug signed apk), then you can get your release key hash as described here: [https://developers.facebook.com/docs/android/getting-started#](https://developers.facebook.com/docs/android/getting-started#).

So using the release keystore, you just read its hash on your local machine, provide it to your facebook project and build your apk using this keystore.

---

<div class="post-metadata">

**Author:** ![Development\_Vampr](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Development\_Vampr](https://discuss.bitrise.io/u/Development_Vampr)\
**Post date:** [January 9, 2018, 11:42pm UTC](https://discuss.bitrise.io/t/android-debug-facebook-key-hash-automation/3552/3 "2018-01-09T23:42:46Z")

</div>

Fantastic solution. Thanks very much.
