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:
- 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 ?
- 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 base64when i ask for hash key ?
The answer based on my experience
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.
Yes. You replace
~/.android/debug.keystorewith 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.