Native Facebook prompt returning loginCancelled

Hi, I was trying to release a game that uses facebook login.

I had a problem on android OSes. On iOS, it works fine. On android devices where logging in through webview worked fine, but when a native facebook app is installed, the facebook access prompt will pop up, when I press ok (or cancel), I get the same “loginCancelled” as the following.

I/Corona  (12673): Facebook Listener events:

I/Corona  (12673):    type(session)

I/Corona  (12673):    name(fbconnect)

I/Corona  (12673):    phase(loginCancelled)

I/Corona  (12673):    isError(false)

I/Corona  (12673):    response()

I/Corona  (12673): event.name    fbconnect

I/Corona  (12673): event.type:    session

I/Corona  (12673): isError: false

I/Corona  (12673): didComplete: nil

I/Corona  (12673): Session Status: loginCancelled

I confirmed that this was not my application specific issue by testing the coronaSDK sample code “Facebook”.

I tested and found same result on …

Devices - 

I tried on Galaxy S3 Jelly bean 3.1.2,

Galaxy S3 Jelly bean 3.1.3,

Nexus 7 (second version) Kitkat 4.4

Corona SDK versions - 

2013.1202,

2013.1260,

2013.2097

Options -

Sandbox mode, Non-sandbox mode

Licensing key check, Not checking

Keystores perfect

If you have an answer, having the same problem, please share your wisdom.

Thank you very much !

I’m going to have to speculate that you have a keystore / hash problem.

There should be an error message in your device’s console log as to what is going on.  If you don’t know how to read the console log on your device, please see:  http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Now, the keystore issue is the most likely thing, even though you say the Keystores are perfect.  Too many people will build with the debug keystore, but generate the hash off of the release keystore.  People will follow Facebook’s example and build the keystore off of the default android debug keystore.  Corona’s debug keystore is different and the hash’s won’t match.   Please make sure to read this as well:  http://coronalabs.com/blog/2013/07/30/understanding-facebook-authentication/

If you are still having problems after this, please post the results of your console.log, screen shots of your Corona SDK build screen and Facebook setup screen.

Also what version of Corona SDK are you using?

Thanks

Rob

You were right!

I thought the hash key was the same as the licensing key for some reason.

After 2 full days of struggling, your solution helped us release our game !(Whispers) it’s called “Cubic” (clears throat)

Thank you very much for such a quick reply Rob the jedi!

You saved our lives! XD Have a great night!

P.S. We started developing on 2013.1202 and released on iOS with that and released on android with 2013.1260. No reason for the difference, it was sort of coincidental. We will use graphics 2.0 for our next game. :slight_smile:

I’m going to have to speculate that you have a keystore / hash problem.

There should be an error message in your device’s console log as to what is going on.  If you don’t know how to read the console log on your device, please see:  http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Now, the keystore issue is the most likely thing, even though you say the Keystores are perfect.  Too many people will build with the debug keystore, but generate the hash off of the release keystore.  People will follow Facebook’s example and build the keystore off of the default android debug keystore.  Corona’s debug keystore is different and the hash’s won’t match.   Please make sure to read this as well:  http://coronalabs.com/blog/2013/07/30/understanding-facebook-authentication/

If you are still having problems after this, please post the results of your console.log, screen shots of your Corona SDK build screen and Facebook setup screen.

Also what version of Corona SDK are you using?

Thanks

Rob

You were right!

I thought the hash key was the same as the licensing key for some reason.

After 2 full days of struggling, your solution helped us release our game !(Whispers) it’s called “Cubic” (clears throat)

Thank you very much for such a quick reply Rob the jedi!

You saved our lives! XD Have a great night!

P.S. We started developing on 2013.1202 and released on iOS with that and released on android with 2013.1260. No reason for the difference, it was sort of coincidental. We will use graphics 2.0 for our next game. :slight_smile: