Facebook not working with Exported/Signed APK File

前端 未结 3 1613
不思量自难忘°
不思量自难忘° 2021-01-12 19:23

I have recently got Facebook to work when debugging my application by following the insructions on facebooks developer page on how to export and get the hash key we need to

相关标签:
3条回答
  • 2021-01-12 19:41

    You are correct on the key hash's being different from the debug.keystore and the release signing key. To remedy that, follow the steps on this website here: http://www.helloandroid.com/tutorials/using-facebook-sdk-android-development-part-1

    It has a nice tutorial that will fix the issue in almost no time.

    The gist of it is:

    1. Download OpenSSl for Windows and extract the .zip to a simple location like: c:\openssl with all the contents of the zip extracted in this folder's root.
    2. Copy your signing key file to your JRE installation's bin folder. For example, in my case: C:\Program Files\Java\jre7\bin
    3. While in the bin folder where you copied the signing key, Press SHIFT+ Right Click -> Open command window here.
    4. Run this command: keytool -exportcert -alias YOUR_ALIAS -keystore YOUR_SIGNING_KEY > c:\openssl\bin\debug.txt
    5. Enter your password for the signing key
    6. Now, navigate to the c:\openssl\bin folder and type in the following commands:

    openssl sha1 -binary debug.txt > debug_sha.txt

    And then,

    openssl base64 -in debug_sha.txt > debug_base64.txt

    Done! The debug_base64.txt contains your Key Hash. Copy this in your app console and you are all set.

    This sounds lengthy, but you really will be done in literally 4 - 5 minutes. ;-)

    0 讨论(0)
  • 2021-01-12 19:42

    Copy Paste the SHA1 key to the link.

    Internally its converting Hex to Base64.

    We can convert from this Website directly.

    worked for me.

    0 讨论(0)
  • 2021-01-12 19:44

    In order to generate the key Please follow the steps provided above. the main problem you can face will be alias as it'll throw exception: keytool error: unable to find alias (likely). if you have signed key to release the app fetch alias of that key using:

    keytool -list -keystore

    Now use this alias in keytool -exportcert -alias -keystore c:\openssl\bin\debug.txt

    Now you can follow the steps mentioned in the previous comment.

    0 讨论(0)
提交回复
热议问题