3

I have been able to successfully develop an application that uses Facebook SSO with a debug key. When I released the app for testing the Facebook SSO no longer works. I need a new Facebook Key that is not a debug key. My problem is, I do not know how to generate it. Any help would be much appreciated.

I am using windows 7 and eclipse.

James Fazio
  • 6,370
  • 9
  • 38
  • 47

1 Answers1

1

Here is what you do to create a new key and to sign your app for distribution.

1) Right-click on your project in the Package Explorer section of Eclipse and select Android Tools > Export Signed Application Package...

enter image description here

2) Go through the wizard, make sure your project is selected as the one to export

3) Next step is to create a new keystore. Specify the path and what you want the password to be

enter image description here

4) You can change the alias if you want, but default is "android" which is sufficient. Set a password for this alias, set the validity of this key (between 0-1000 years), and at least your first and last name. You can also add any other details you want associated with this key (not required, however).

enter image description here

5) Finish the procedure by specifying the path to where you want to export your APK to be. Press Finish, Eclipse will take a while to package your app. Once it's done, you'll have your new key at the path you specified, as well as an APK file signed by that new key.

Let me know if that helps!

Jesse Chen
  • 4,928
  • 1
  • 20
  • 20
  • Thanks for the info, but I have already exported my application. I have an existing keystore, but I am wondering how to generate an android key-hash for facebook with my existing keystore. – James Fazio Aug 20 '12 at 21:14
  • 2
    Oh that's simple. Run `keytool -exportcert -alias MY_ALIAS_HERE -keystore ~/path/to/my/android.keystore | openssl sha1 -binary | openssl base64` Run the same command that you did when you were using the debug.keystore but specify the alias and the path to your existing keystore. Copy and paste the returned string to your app's dashboard settings on Facebook – Jesse Chen Aug 20 '12 at 22:36
  • @JamesFazio does it work?im facing the same issue.Igenerated hash key with the keystore ,which i used to sign the apk.But FB SSO login is not working. – Chirag Shah Jul 08 '13 at 12:59
  • Yes @ChiragShah, the comment above mine worked for creating a store key. – James Fazio Jul 08 '13 at 16:22
  • @JamesFazio tnx for rpl,but i also found the solution.My key hash was wrong. – Chirag Shah Jul 09 '13 at 05:40