I'm working on an Android app, in which I want to integrate a Facebook posting feature. I downloaded the Facebook-Android SDK, and I got the readme.md (text file) in there, in which it is mentioned to generate the key hash for Android. How do I generate it?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
For Windows:-
keytool -exportcert -alias androiddebugkey -keystore C:\Android.android \debug.keystore |"C:\openSSL\bin\openssl" sha1 -binary | "C:\openSSL\bin \openssl" base64
To generate a hash of your release key, run the following command on Mac or Windows substituting your release key alias and the path to your keystore.
On Windows, use:
This command should generate a 28 characher string. Remember that COPY and PASTE this Release Key Hash into your Facebook App ID's Android settings.
image: fbcdn-dragon-a.akamaihd.net/hphotos-ak-xpa1/t39.2178-6/851568_627654437290708_1803108402_n.png
Refer from : https://developers.facebook.com/docs/android/getting-started#release-key-hash and http://note.taable.com
For people who dont know how to code, AivarsDa's key gen tool on google play i the easiest solution. just get the hash key from it and copy to the facebook app settings. The share on the keygen tool makes my app crash on my phone, so i just manually typed it in notepad and copied it to fb. Finally past this step after days of frustration
Use this for print key hash in kotlin
I've created a small tool for Windows and Mac OS X. Just throw in the key-store file, and get the hash key.
If you want the default debug.keystore file, use the default alias and password. Else, use your own keystore file and values.
Check it out, download the Windows version or download the Mac OS X version (Dev-Host might be down sometimes... so if the link is broken, PM me and I'll fix it).
I hope that help you guys...
Dec 31, 2014 - EDIT: Changed host to AFH. Please let me know if the links are broken
Nov 21, 2013 - EDIT:
As users requested, I added a default keystore location and a DONATE button. Feel free to use it if I've helped you. :)
Add this code to
onCreate
of your activity, it will print the hash under the KeyHash tag in your logCatYou can add multiple hashkeys for your account, so if you been running in debug don't forget to run this again in release mode.