Saturday, February 25, 2012

Hash Key Mismatch Problem in Facebook Android App



Hi,Friends 
Working on my android project i faced some problem during integrating Facebook in my app.
This post will help you to fix issue that i have faced.

Problem:
I implemented Facebook SSO(single Sign On) in my Android app.
All the time throughout the development, in emulator everything worked just
fine,problem occurred when i try to login with my app onto device.
It showed HASH KEY MISMATCH ERROR and failed to login.
I got following error:
11-02 16:41:31.660: D/Facebook-authorize(13194): Login failed: invalid_key:Android key mismatch. Your key "########your hash key####" does not match the allowed keys specified in your application settings. Check your application settings at http://www.facebook.com/developers


Solution:
At last after long time i resolve this problem.
Suppose your hash key is "#### your hash key####".
This key is encrypt by the device so you have to tell this key to Facebook(in your application which you have created).
for this hit this URL https://www.facebook.com/developers and edit your app.
Now you have to copy this hash key in your Native App section then save it.
Here is the screen shot

That's all
Now enjoy your uninterrupted Facebook integration in your app.

happy coding
have a good day.

Next: Customized list View