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 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) {
}
}
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.
Related Topics
How to Write Files to External Public Storage in Android So That They Are Visible from Windows
Sqlite Getting Nearest Locations (With Latitude and Longitude)
Populating a Listview Using an Arraylist
Java Command Not Found on Linux
How to Create an Executable Jar With Dependencies Using Maven
Difference Between Chromedriver and Webdriver in Selenium
What Is the Point of the Diamond Operator (≪≫) in Java
How to Read Xml Using Xpath in Java
Calling Non-Static Method in Static Method in Java
How to "Scan" a Website (Or Page) For Info, and Bring It into My Program
How to Use Java 8 For Android Development
How to Do a Synchronous Request With Volley
Execution Failed For Task :App:Compiledebugjavawithjavac in Android Studio
Limit Jvm Process Memory on Ubuntu
How to Use Java.Net.Urlconnection to Fire and Handle Http Requests