I have integrated my application with Facebook, and for this I am using Facebook's Graph API. I am retrieving profile and friends information. It is working fine on my device which has Android 2.3 (Gingerbread), but recently my client has faced an issue while he is trying to connect to Facebook through my app. He has Android 4.0 (Ice Cream Sandwich) on his device. When he clicks a button on the app that takes him to the Facebook login screen, after login he gets a message:
My app is misconfigured for Facebook login. Press Okay to go back to the application without connecting to Facebook.
I am not getting what is the problem whether it is related to Android version or what.
How can I fix this problem?
Usually this problem could be solved with two check:
It's a keystore issue..configure your eclipse to use the same keystore for which app was configured for.
From what I could gather, it's a Facebook problem and has been reported. But, the problem persists.
A way around this (tested on 2.3.3) is to hack on the Facebook SDK, seach for the 2 authorize methods and change the DEFAULT_AUTH_ACTIVITY_CODE to FORCE_DIALOG_AUTH. This will disable the Single Sign On feature.
If your prefer got to
and disable the startSingleSignOn part. It's preferable not to, because eventually Facebook will solve the problem, and you only have to put the old constant back.
EDIT
This solution raises security problems. Check Jesse Chen answer.
Although late, still useful: *Here's the corerct way to do(for debug key, change accordingly for release):*
The hash is in the last generated file: debug_base64.txt....open it and copy the hash.
Remember to replace "" and with your username and drive letter of your choice
On Debian system like ubuntu use the
keytool
ofjava
found under directory/usr/lib/jvm/jdk*.*.*/bin/keytool
and generate like thisThis way you get the authentic hash key that can be put under your app hash of facebook.
I had a similar problem, but for iOS.
The solution is to do with configuring the Facebook app on the Facebook developer daskboard.
For iOS, 2 things must be done:
Enabled Facebook Login
Bundle ID must be the same as the app