How to Create Android Facebook Key Hash

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?

  1. Go to your output apk files (Usually <project_root>\build\app\outputs\flutter-apk).

  2. Use keytools to get the SHA1 value (run in terminal / git bash):

    keytool -printcert -jarfile app-debug.apk

  3. Convert the HEX value to base64 to get value that ends with =. (i.e. Use this site. Be aware to have at Input type selected Hex. And delete all : between SHA1 key groups -> AB:CD:EF = wrong, but ABCDEF = correct)

  4. Update that value to key hashes under your android platform.



Related Topics



Leave a reply



Submit