0

I have integrated the facebooksdk into my android application which is using scringo,
I am able to signup to FB using the below code,

Intent intent = new Intent(ScringoSignUpActivitySub.this, ScringoProfileBridge.class);
intent.putExtra("network", "facebook");
intent.putExtra("action", "signUp");
//intent.putExtra("action", "login");
startActivityForResult(intent, 102);

but i am not able to login to FB in the similar manner as below,

Intent intent = new Intent(ScringoSignUpActivitySub.this, ScringoProfileBridge.class);
intent.putExtra("network", "facebook");
intent.putExtra("action", "login");
//intent.putExtra("action", "login");
startActivityForResult(intent, 102);

i am getting error as 'This app has no Android key hashes configured....'

kumar
  • 708
  • 4
  • 15
  • 39

1 Answers1

1

Try to generate key hash using below code : public void keyHash() {

    try {
        Log.d("Checking signs", "Signs");
        PackageInfo info = getPackageManager().getPackageInfo(
                this.getPackageName(), PackageManager.GET_SIGNATURES);
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            System.out.print(Base64.encodeToString(md.digest(),
                    Base64.DEFAULT));

        }
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    } catch (NoSuchAlgorithmException e) {
        e.printStackTrace();
    }
}

And Check for "Status and Review" menu in your project facebook developers site,

Do you want to make this app and all its live features available to the general public? Set this line to "Yes"

Reena
  • 1,368
  • 1
  • 11
  • 25
  • thanku... i got the key from ur code and its working fine.. and another thing is i was confused b/t this key with SH1 key(it will be in the format 6A:7C:97:A0:AE:....),i was using SH1 key before.i came to know that that is a different key – kumar Jun 21 '14 at 14:41
  • http://stackoverflow.com/questions/4388992/key-hash-for-android-facebook-app please go through this discussion, If you found my answer is useful then accept it. – Reena Jun 22 '14 at 06:20
  • After few hours. My issue was the "status and review" part of your answer. Thanks alot mate – mnaa Jul 03 '14 at 22:52