Facebook Connect on Android: Never Works

@BenM. My Nexus One is still on 2.2 and I haven’t updated it because we wanted to keep it there for testing purposes. I believe we have another Nexus One and it may have been upgraded so will try that.

Anyone else having problems with the Facebook fix on Android?

Thanks,
Tom [import]uid: 7559 topic_id: 10637 reply_id: 45233[/import]

Tom,

Still not working on some test phones here.

Did you test with upgraded Nexus One?

Do you want more detailed info on the test phones?

Trond.
[import]uid: 34372 topic_id: 10637 reply_id: 45750[/import]

@Tom… I have just tested on a Dell Streak with Android v2.2.2 and FaceBook 1.6.0. This also failed.
[import]uid: 28534 topic_id: 10637 reply_id: 45754[/import]

Ben, Trond,

If your Android device does not have an active Internet connection, then a web view will be displayed and quickly hidden. No login window will be displayed to the user. This is how the Facebook SDK handles lack of Internet (it is beyond Corona’s control). So, please double check your device’s Internet connection with its web browser.

Also, a login window will only be displayed once after the first successful login. This is because login information is stored to the Android device so that the user does not get prompted the next time the user starts up the app. In this case, your Facebook listener should be getting an immediate success event. Please verify that this is the case with your app.

I’d also like you to try running “adb logcat” on the device that’s failing you to see exactly what kind of errors are being logged. If you can post these error messages here, then that would help us isolate this issue.

Thanks! [import]uid: 32256 topic_id: 10637 reply_id: 46122[/import]

Facebook connection - Still not working.

Each time trying to connect, this message appears “There was an application error. Please try again later.”

Phone:

  • Mobile : HTC Sense
  • Android version: 2.3.3
  • FaceBook version: 1.6.1 [import]uid: 13114 topic_id: 10637 reply_id: 47229[/import]

@Joshua,

Definitely has internet connection.

I have run ADB logcat and do get an error, which appears to be before any Facebook interaction. It is a query with our web server, so will check that first and let you know if there is still a problems or not. Thanks.
UPDATE:
The error in the ADB logcat mentioned, was in fact not Facebook. It was prior to it. The code has been changed and now the Nexus One is reaching the Facebook code and working as expected. [import]uid: 28534 topic_id: 10637 reply_id: 46340[/import]

Hi everyone!!
I have the same problem and i need to solve it quikly!
My application works fine on emulator, but it does’nt work on HTC device(Android 2.3.5). The problem is facebook connect!
Can anybody give any solutions? [import]uid: 154602 topic_id: 10637 reply_id: 110240[/import]

@hakobyanhexine: Various facebook issues have been fixed in the latest daily builds, please don’t bump old threads like this.

The next public release is imminent so you won’t have to wait long for the fix [import]uid: 84637 topic_id: 10637 reply_id: 110308[/import]

hakobyanhexine,

The most common cause of facebook login failures is due to the app hash code not matching the hash code that you have submitted to the facebook developer site. My best advise to is to run “adb logcat” while your Android device is conencted to your machine via USB to view a real-time log of what is happening while attempting to connect to facebook. If you see a warning in the log about the hash code not matching, well then there is the reason. From there, the simple solution is to copy and paste that hash code in the log to the facebook developer webpage for your app. Please see the following forum thread for more details.

http://developer.anscamobile.com/forum/2012/01/21/facebook-post-wall-not-working-android-device#comment-109420
[import]uid: 32256 topic_id: 10637 reply_id: 110337[/import]

Joshua Quick,

Thanks for answer!
At first my problem was hash key, but then I fixed it by generating new hask key with this command:

keytool -exportcert -alias [alias] -keystore [keystore] | openssl sha1 -binary | openssl enc -a -e

After it, when I’m launching my application and trying to login with facebook it simly shows a black screen(in logcat I find out that it’s starting a looper and doesn’t stop it). After some time it shows ‘force close’.

I have also tried ‘Facebook.FORCE_DIALOG_AUTH’ in facebook.authorize function, but it’s also not working. [import]uid: 154602 topic_id: 10637 reply_id: 110345[/import]

I’m glad you’ve got the hash key issue resolved.

Regarding this new issue, try using your hash key and keystore with the facebook sample app that is included with the Corona SDK. If the sample app works correctly for you (it does for me), then it is likely some other feature that is causing you grief. Just need to narrow it down. If there are any “clues” in logcat, then please feel free to copy and paste it here. [import]uid: 32256 topic_id: 10637 reply_id: 110355[/import]