简体   繁体   中英

Appcelerator Android keyhash for facebook?

i am using appcelerator Studio 6.0.4GA SDK , i am having issue by finding debug.keystore

when i write in Terminal :

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

its return keyhash , i've put this keyhash in Facebook developer app but its still giving error key hash not matched , where i can get this keyhash, since i am using Mac and Appcelerator Studio .

There are 2 types of key-hashes developers need to put into FB app settings.


- Development Key Hash -

As mentioned in FB docs here , you need to run this command for all development builds,

keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64
  • androiddebugkey is the key_alias name
  • debug.keystore is the keystore file name which is stored in your mac user home-directory in a hidden folder .android
  • after running this command, it will ask for a password, put android , it's the default password for this default keystore.


- Production Key Hash -

Same command is used to get production key-hash but with your own keystore file, alias_name & password.

keytool -exportcert -alias <alias_name> -keystore <keystore_file_path> | openssl sha1 -binary | openssl base64
  • put alias_name as same as you used to create your production keystore.
  • put same password you used to generate your production keystore.

Here is the solution might help someone else

1- navigate to /Users/YOUR_USER_NAME/Library/Application Support/Titanium/mobilesdk/osx/<YOUR_SDK_VERSION>

2- type in terminal

keytool -exportcert -alias tidev -keystore dev_keystore | openssl sha1 -binary | openssl base64

3- put the password : tirocks

they keyhash will print out

要保存工作,您只需使用zON/CPoDnIgHvMure4hh9HWdR58= ,它代表Titanium Android应用程序的默认dev-keystore。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM