Create Release Key for Facebook SDK 3.0 on Android

I have a strange problem. I am trying to integrate Facebook into my application. The functional part works fine, but the problem is that it only works when connected directly from my PC, if it works fine when I connect my phone to the eclipse and send the application. If I extract apk and install it directly from my phone, the application does not register me, does not create a session, etc. Etc.

Can anyone tell me what is wrong here?

Update 1:

Created a key recommended by SK9 on the official facebook developer website.

C: \ Java \ jdk1.7.0_10 \ bin> keytool -exportcert -alias myAppfull -key store myAppfull | C: \ openssl-0.9.8k_X64 \ bin \ openssl sha1 -binary | C: \ openssl-0.9.8k_X64 \ bin \ openssl base64 I get a password prompt. I entered the password that I used to export to eclipse and it gave the code. I went to the developers page.

Where: myAppfull is the alias and keystore I used when exporting using eclipse.

still the same problem? Is there something I don't see?

Thanks!

Update 2:

It worked! Thank you !! May be useful for others. Check out my answer below!

+4
source share
3 answers

Thanks to SK9 and Vizz. I did some more research and figured out how to fix this problem.

THIS IS USEFUL FOR PEOPLE WHO USE THE ELLIPSE TO CREATE A KEY BASIS FOR RELEASE.

1) Open a command prompt and specify the path to the JDK Bin folder in my case (C: \ Java \ jdk1.7.0_10 \ bin).

2) Copy this code keytool -exportcert -alias "youraliasnamethatwasgivenwhileexportineclipse" -keystore yourkeystorethatsavedwhileexportineclipse> c: \ openssl \ bin \ release.txt

3) Now you need to enter the password, password = "samepasswordthatyouwhilewhilecreating thekeystoreineclipse".

4) See in the openssl bin folder you will get a file called release.txt

5) Now change the directory to your open ssl folder in my case: C: \ openssl-0.9.8k_X64 \ bin \

6) copy the following code and paste openssl sha1 -binary release.txt> release_sha.txt

7) you will get the release_sha.txt file in the openssl bin folder

8) Copy the following code again and paste openssl base64 -in release_sha.txt> release_base64.txt

9) you will get the release_ section .exe file in the opensl bin folder

10) open the file release release_base64.txt - Bingo you have hashkey - copy the key.

Paste this next to your debug key on the facebook developer website. He should start working!

+10
source

Make sure that the signed certificates for the APK and those registered in the Facebook developers account match. They do not seem to do this.

See Facebook # 5 . Add the hash key of the release key to the list.

+2
source

I am facing the same question a long time ago. It seems that the problem occurs (on Windows only) when you mix both commands on the same line (the result is corrupted). What I did was done separately. I don’t remember the exact way I did it, but it works out for me, which looks like what I found.

Exporting keystore cert keytool -exportcert -alias <insert the name of your alias here> -keystore <insert the route of your key here> -storepass android -keypass android > namefile.bin Converting to sha1 <insert the route of your \bin\openssl here > sha1 -binary namefile.bin > namefile.sha1 Converting to base64 <insert the route of your \bin\openssl here > base64 -in namefile.sha1 -out namefile.base64 Done, Android hash key for Facebook app is: <insert the route of your \bin\openssl here > base64 -in namefile.sha1 

Source: Another Stop Flow Question

0
source

Source: https://habr.com/ru/post/1488187/


All Articles