3

Possible Duplicate:
App is misconfigured for Facebook login : Android Facebook integration issue

Getting strange problem from Facebook SDK Application is Mis-Configured for Facebook login. Press Okay to go back to the application without connecting to Facebook.

Question already asked here, I tried but not finding any solution in given answers.

this problem does not return any error or response or any exception.. already changed more then 2 to 3 APP_IDs..

enter image description here

Community
  • 1
  • 1
SilentKiller
  • 7,088
  • 6
  • 37
  • 74

4 Answers4

5

Have you tried checking logcat to see what kind of error message is displayed after pressing the "Okay" button? You mentioned you have already set your own APP_ID, but did you put your Android Hash Key in your dashboard?

If you still can't get it to work, follow the steps here in our documentation to see if you can set it up and authenticate with our sample app. The sample app is guaranteed to work if you have implemented it correctly - if you can't set up Hackbook to work correctly, then you can't set up your own app correctly. If you are able to get Hackbook working, then you just need to make sure you're doing the same thing in your app to work.

Jesse Chen
  • 4,928
  • 1
  • 18
  • 20
  • Whether Android Hash Key is necessary...??? @Jesse Chen – SilentKiller Sep 21 '12 at 10:47
  • in emulator it is working fine but in device showing this error... – SilentKiller Sep 21 '12 at 11:38
  • I had tried on different devices which has default Facebook app, on that devices my app is not working. if i uninstall Facebook default app my application is perfectly running and sharing the data.... – SilentKiller Sep 21 '12 at 13:19
  • 3
    Android Hash Key is required in your app dashboard if you want login to work with the Facebook app installed. Read this to see how to put your hash key in. https://developers.facebook.com/docs/mobile/android/build/#sig – Jesse Chen Sep 21 '12 at 20:32
  • done thanks.... prob of Android Hash Key only... – SilentKiller Sep 24 '12 at 10:30
  • @JesseChen sir, i have included hash key but still it is showing the same error on Nexus 7 but running perfectly on Samsung galaxy 7" tab. – Rohit Jan 15 '13 at 12:32
5

to generate signature you need openssl installed on your pc. If you don’t have one download openssl from here(http://code.google.com/p/openssl-for-windows/downloads/list)

  1. In C: , Create openssl folder
  2. extract the contents of downloaded openssl zip file into openssl folder in C:drive
  3. copy the openssl contents into jdk1.6.0\bin folder
  4. open Command prompt
  5. move to bin of jdk1.6.0\bin. can be done by using.. cd "your jdk1.6.0 bin directory " run the following command to generate your keyhash. While generating hashkey it should ask you password.

keytool -exportcert -alias androiddebugkey -keystore "C:\Users\Arsalan.android\debug.keystore" | openssl sha1 -binary | openssl base64

NOTE: in the above code note that , you need to give your path to user ( i.e in my case it is C:\Users\Arsalan , you just need to change this for your user account.

Give password as android

. If it don’t ask for password your keystore path is incorrect.

Aleksander Blomskøld
  • 17,546
  • 9
  • 71
  • 82
Syed Arsalan Kazmi
  • 656
  • 1
  • 6
  • 16
2

It's very simple...

Just change the function in facebook.java :-

public void authorize(Activity activity, String[] permissions,
        final DialogListener listener) {
    authorize(activity, permissions, **DEFAULT_AUTH_ACTIVITY_CODE**, listener);
}

to----- public void authorize(Activity activity, String[] permissions, final DialogListener listener) { authorize(activity, permissions, FORCE_DIALOG_AUTH, listener); } it will work..

Mithun
  • 21
  • 3
2

I have toiled for two days & got the solution at last, this is the WRONG way to get the hash key -

keytool -exportcert -alias *<your _alias_name>* -keystore *<key_store_path>* | [openssl_bin_directory]\openssl sha1 -binary | [openssl_bin_directory]\openssl base64

The RIGHT way is described here -

http://facebook.stackoverflow.com/questions/13281913/app-is-misconfigured-for-facebook-login-with-release-key-hash

or here

Facebook Android Generate Key Hash

Community
  • 1
  • 1
Khobaib
  • 1,507
  • 2
  • 19
  • 29