I uploaded my fully working app on Google Play and when download it from there, facebook login doesn't work!! I properly configure my facebook app and works with eclipse environment. After searching, it can be done due to facebook key hashes. However, I obtained it like:

That is expected. You generated the Key Hash for the debug key while testing using Eclipse. You will also need to generate a Key Hash for your app using the release key, the one that you signed your app with for deploying on Google Play. Do that, and you will be good to go. ;-)
–
Siddharth LeleJul 21 '13 at 9:02

1

@SiddharthLele Perhaps you should post that as an answer.
–
tbodtJul 21 '13 at 9:09

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.

In my experiece, both the methods have given me the correct Key Hash. However, in a few cases (rather random ones), the first alternative did not give the correct Key Hash while the second alternative has always worked. See which works for you.

for alternative1, it returns me key hash that I already have, debug one!but I need distribution one. I have apk file signed but how to acces to it in order to get key hash?
–
JaumeJul 21 '13 at 10:03

@Jaume: Have you exported a new Signed APK with the release key? You will need to do that, then manually copy that APK on your device, install from a File Manager and then run the app with the device connected to the computer and the DDMS view open.
–
Siddharth LeleJul 21 '13 at 10:05

@Jaume: I suspect it still gives you the old key hash because you haven't exported a signed APK and installed that.
–
Siddharth LeleJul 21 '13 at 10:06

well I did it with signed apk and it returns a different key hash. This seems to be what I was expecting and then, I added to facebook key hashes on my app. However, still doing the same... Should I modify something else or am I missing anything?
–
JaumeJul 21 '13 at 17:20

problem was on log key hash. I don't know why but must be saved first as string and then log it. After that, solved!! many thanks for "alternative 1" code!! really thankfull
–
JaumeJul 21 '13 at 19:15