0

Can I just get app id and facebook account kit from facebook developers ? I launch The Command Prompt and go to my java bin directory and execute the following command : keytool -exportcert -alias androiddebugkey -keystore C:\Users\Ousama.android\debug.keystore | "C:\Users\Ousama\Desktop\openssl-0.9.8k_X64\bin\openssl.exe" shal -binary | "C:\Users\Ousama\Desktop\openssl-0.9.8k_X64\bin\openssl.exe" base64. But i don't have any output, he just say that the syntaxe of the command (keytool -exportcert -alias androiddebugkey -keystore ) is incorrect !

2 Answers2

0

It is necessary to generate a key hash if you would like to take advantage of the instant verification feature. You would then add the key hash to the app dashbpard at developer.facebook.com Reference for instant verification: https://developers.facebook.com/docs/accountkit/overview#Instant_verification

user2816456
  • 569
  • 2
  • 5
  • 15
0

Declare this function

public static final String TAG = "OTP Activity";   // put this first on your main activity .

and call this function inside your OnCreate method.

printHashKey(this);

Here is the code:

public void printHashKey(Context pContext) {
    try {
        PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES);
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            String hashKey = new String(Base64.encode(md.digest(), 0));
            Log.i(TAG, "printHashKey() Hash Key: " + hashKey);
        }
    } catch (NoSuchAlgorithmException e) {
        Log.e(TAG, "printHashKey()", e);
    } catch (Exception e) {
        Log.e(TAG, "printHashKey()", e);
    }
}

You will get your app HASH key from Logcat.

Mihai Chelaru
  • 7,614
  • 14
  • 45
  • 51
Prapon
  • 59
  • 9