How to create Android Facebook Key Hash?
Here is what you need to do -
Download openSSl from Code
Extract it. create a folder- OpenSSL in C:/ and copy the extracted code here.
detect debug.keystore file path. If u didn't find, then do a search in C:/ and use the Path in the command in next step.
detect your keytool.exe path and go to that dir/ in command prompt and run this command in 1 line-
$ keytool -exportcert -alias androiddebugkey -keystore "C:\Documents and Settings\Administrator.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64
it will ask for password, put android
that's all. u will get a key-hash
Facebook Android Generate Key Hash
Delete your debug certificate under ~/.android/debug.keystore (on Linux and Mac OS X); the directory is something like %USERHOME%/.android on Windows.
The Eclipse plugin should then generate a new certificate when you next try to build a debug package.
Let me know if that works.
Android Facebook SDK: generate release key hash
You followed the steps that facebook provides for the creation of a login application?
You need a 'Production keyhash' obtained starting your release keystore:
From comand line:
keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64
And add this key on facebook app page options.
More information: https://developers.facebook.com/docs/android/getting-started/
Facebook login, problem with hash key - Flutter , How to generate Facebook Hashkey in flutter?
Go to your output apk files (Usually
<project_root>\build\app\outputs\flutter-apk
).Use keytools to get the SHA1 value (run in terminal / git bash):
keytool -printcert -jarfile app-debug.apk
Convert the HEX value to base64 to get value that ends with =. (i.e. Use this site. Be aware to have at
Input type
selectedHex
. And delete all:
between SHA1 key groups ->AB:CD:EF
= wrong, butABCDEF
= correct)Update that value to key hashes under your android platform.
facebook hash key when using android studio
WHy dont you try this code and check out the hash key you are using. From the facebook docs:
Besides double checking your key hash generation steps, here is another option that ensures you're using the correct key hash. It involves changing code in one of the sample apps to print the signature sent to Facebook.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Add code to print out the key hash
try {
PackageInfo info = getPackageManager().getPackageInfo(
"your.package",
PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
} catch (NameNotFoundException e) {
} catch (NoSuchAlgorithmException e) {
}
}
Related Topics
Checking If an Android Application Is Running in the Background
How to Check If a Service Is Running on Android
Failed to Resolve: Com.Android.Support:Cardview-V7:26.0.0 Android
How to Detect When an Android App Goes to the Background and Come Back to the Foreground
How to Open the Google Play Store Directly from My Android Application
How to Detect Incoming Calls, in an Android Device
How to Add Dividers and Spaces Between Items in Recyclerview
What APIs Are Used to Draw Over Other Apps (Like Facebook'S Chat Heads)
Get Visible Items in Recyclerview
Set Color of Textview Span in Android
How to Change the Font on the Textview
Android: Go Back to Previous Activity
Android 8.0: Java.Lang.Illegalstateexception: Not Allowed to Start Service Intent
Firebase Offline Capabilities and Addlistenerforsinglevalueevent