Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
464 views
in Technique[技术] by (71.8m points)

android - 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 ?
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...