Facebook sdk 3.0 android

后端 未结 3 1727
走了就别回头了
走了就别回头了 2021-01-07 08:46

I have gone through the tutorials on developer.facebook.com for basic hello world facebook app for android countless times to make sure im not making a mistake but I get the

3条回答
  •  遥遥无期
    2021-01-07 09:44

    try

    try {
    PackageInfo info = getPackageManager().getPackageInfo("com.eatapp", PackageManager.GET_SIGNATURES);
    for (Signature signature : info.signatures) {
        MessageDigest md = MessageDigest.getInstance("SHA");
        md.update(signature.toByteArray());
        Log.e("MY KEY HASH:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
    }
    } catch (NameNotFoundException e) {
    
    } catch (NoSuchAlgorithmException e) {
    
    }
    

    in your main Activity :-) This is the only solution it works for me for Android SDK 3.0

提交回复
热议问题