0

I have been following the Facebook API guide on https://developers.facebook.com/docs/mobile/android/build/#sig and in step 5 it says

There are two ways to find your Android application signature:

1) From debug logs generated during Single Sign On when there is a signature mismatch.

2) From the Java JDK keytool.

How do I find it using debug logs? I have enabled the logs as they said, using private static boolean ENABLE_LOG = true;. I want to know this because I have tried to get it following step 2, but unsuccessfully. I can't find anything in the logs that would tell me the correct Key Hash.

Community
  • 1
  • 1
sk1ll3r
  • 295
  • 4
  • 15
  • you need to run single sign on (on you android app) and watch the logcat. it will appear there as an error. – Tamir Scherzer Sep 27 '12 at 13:15
  • that's what i've been doing... nothing to be found there. do you know what tag should the error have? – sk1ll3r Sep 27 '12 at 13:25
  • looks something like this: 11-02 16:41:31.660: D/Facebook-authorize(13194): Login failed: invalid_key:Android key mismatch. Your key "***************" does not match the allowed keys specified in your application settings. Check your application settings at http://www.facebook.com/developers – Tamir Scherzer Sep 27 '12 at 15:20
  • remember, there is a different key for debug and release versions. you may be getting the message only on one of the versions – Tamir Scherzer Sep 27 '12 at 15:21
  • I can't seem to be able to get the log message to show whatever key i set in my app settings although i do get logs with `Facebook-authorize` tags. – sk1ll3r Sep 27 '12 at 18:15
  • if you dont find the that error in logcat then you must have already entered correct key in your app settings. Otherwise it should have shown it in the error logs. by the way, what is the error you're getting? – Srinivas Kattimani Sep 28 '12 at 03:17
  • I was getting this error "Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider". My exact problem was discussed here http://stackoverflow.com/questions/12620601/facebook-sso-doesnt-work-on-android-device. Although I solved it now by installing a newer version of Facebook app, I couldn't get the key from debug logs... – sk1ll3r Sep 28 '12 at 07:09

1 Answers1

0

after setting private static boolean ENABLE_LOG = true; run single sign on, if at all you dont find the key in error logs then, add this line of code in one of the callback functions mentioned below

        onFacebookError(FacebookError error)
          {

                  System.out.println(error);

          }

now run it check error logs, you'll be able to find the key.

  • I guess it doesn't make a difference if I had `public void onFacebookError(FacebookError error) {Log.d("TAG","onFacebookError "+error.getMessage());}` right? – sk1ll3r Sep 28 '12 at 07:10