0

I think this is a problem with the keys as the error is a pop-up (grey toast) stating, and I've scrambled the base64 key hash here:

(#404) Key hash p5snqdjTasicviuefsd+acASDnceLAFSJOI does not match any stored key hashes.

I've been reading App is misconfigured for Facebook login: Android Facebook integration issue but can't see it as applicable here.

Why not?

  1. 1) I've successfully posted through the Facebook App yesterday with my same app built in eclipse for debugging. It worked but only before I had the fallback code for android SDK 3.17 working.

    2) I've putting a signed app on there which reports a different Key hash unmatched.

    3) I've tried HelloFacebookSample and that returns the same Key hash as my original, built for debug project. That's rather more a point for than against but adds roundness.

    4) I can post all day using Facebook SDK and the app_id only.

Sorry to be a developer whining about intrusive security here but to break the sample apps is really disappointing, I rely on them for my sanity!

Please can someone explain how the key hashes are derived? In the facebook developer console have an App ID (decimal about 15 digits), and App secret (hexadecimal, much longer).

Additionally I would like to know how I am to supply the hash to the facebook activity. Sorry, but a lot of the facebook code has not been working for me and just as I got some that did, it's stopped again.

Having observed the same effect with the supplied samples I'd say this is code independent, before someone asks.

Community
  • 1
  • 1
John
  • 6,433
  • 7
  • 47
  • 82

1 Answers1

0

Sorry to answer myself but I couldn't agree 100% with any of the many answers that came to me after asking this question.

Key hash for Android-Facebook app

is a good start. Many answers all advocating the same use of java's keystore command, ie:

keytool -exportcert -alias androiddebugkey -keystore C:Users\Shalini.android\debug.keystore | "C:\OpenSSL\bin\openssl sha1 -binary | "C:\OpenSSL\bin\openssl base64

thanks to Shalini.

That didn't work for me, the strings were just wrong. I had to copy them from screen grabs, although I could have hunted through logcat for the debug keystore one. Also worth noting, it is very very easy to confuse I with l, that is upper case I with lower case l. I had 3 in my release key and it was only the ninth iteration that I got it right on.

Some good info in that thread about getting this key into Facebook. Coupla tips, append '=' as this seems to be an escape character for facebook's form. Also don't wory too much about SSO. I didn't like the look of it anyway. It can take a couple of tries for your app to be accepted.

Community
  • 1
  • 1
John
  • 6,433
  • 7
  • 47
  • 82