Always getting Session state:CLOSED_LOGIN_FAILED, token:{AccessToken token:ACCESS_TOKEN_REMOVED in facebook android sdk3.0.

For some reason, the hash that the keytool is generating for me isn’t the same as my app. This is what worked for me. Generate a hash using the standard code provided by facebook:

PackageInfo info = getPackageManager().getPackageInfo("<your_package_name>",  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));
    }

Make sure to replace “your_package_name>” with your corresponding package name. Look at logcat and grab the keyhash and enter it in your facebook app settings.

Leave a Comment

File not found.