Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to add new key hash to Facebook app setting every time I change computer?

I download Hackbook example from git then, I create and run project. It show that Login failed: invalid_key(I didn't change anything) So, I try create my new own app and add Hash key that i got from keytool to facebook app setting (Android Native App) Then, I change this new Facebook("My_own_APP_ID"); It works!

The question:

  1. Do I need to add new key hash every time I change development computer(In case, there are many collaborators, Do they need to change Facebook_APP_ID everytime ?
  2. In case, I wanna launch this app to market. Do I need to change this keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 when i ask for hash key ?
like image 326
April Smith Avatar asked Apr 24 '12 03:04

April Smith


People also ask

How do I change my key hash on Facebook?

Go to your Facebook App --> Settings--> Paste Hash key in "key hashes" option -->save changes. Now Test your android app with Facebook Log-in/Share etc.

How do I get the key hash login on Facebook?

Go to the Facebook Developer site. Log into Facebook and, using the dropdown menu in the top-right, go to Developer Settings: In your developer settings, select Sample App from the menu, and add and save your key hash into your profile: You can add multiple key hashes if you develop with multiple machines.


1 Answers

The answer based on my experience

Do I need to add new key hash every time I change development computer(In case, there are many collaborators, Do they need to change Facebook_APP_ID everytime ?

You don't need to change Facebook_APP_ID everytime. Once you created facebook app, you can add multiple key hash to it. If you have many collaborators, get keyhash from them and add the keyhash to your facebook app.

In case, I wanna launch this app to market. Do I need to change this keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 when i ask for hash key ?

Yes. You replace ~/.android/debug.keystore with your own publishing keystore and again add that keyhash to facebook app.


Another alternative,

if you don't want to add a lot of keyhash to facebook app, you can always use one common debug key to sign your android app for all collaborators.

But of course, don't share your publishing key to everyone.

like image 76
PH7 Avatar answered Sep 25 '22 08:09

PH7