Facebook Login on Android isn't working... (loginCancelled)

Hello,

Im having trouble getting facebook login to work in my app on Android devices (works fine on iOS devices), the error/warning that is returned is only “loginCancelled” (phase loginCacelled on Android Debug) and i dont know why.

I even tested the Facebook Sample Code on my Android device and it says the same thing (I only changed the appId and apiKey vars on main.lua and build.settings as well). When I open that app on Android, it doesn’t even asks me for login, it goes directly to the main screen where it says “loginCancelled” on the bottom (Im attaching a screenshot of that screen).

By the way, Im using Corona SDK Stable 2189.

Does anyone know what I might be doing wrong?

Thanks in advance.

This sounds like a very good chance that you’re keyhash is incorrect.  You need to look at your console log on your device for errors.  See:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

If you do not know how to do that.  Then I recommend reading this very very carefully:

http://coronalabs.com/blog/2013/07/30/understanding-facebook-authentication/

Rob

Hi,

It was exactly that, the key hash. I did the steps in that tutorial again and its working well so far.

Thanks!

Hi,

It was exactly that, the key hash. I did the steps in that tutorial again and its working well so far.

Thanks!

This sounds like a very good chance that you’re keyhash is incorrect.  You need to look at your console log on your device for errors.  See:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

If you do not know how to do that.  Then I recommend reading this very very carefully:

http://coronalabs.com/blog/2013/07/30/understanding-facebook-authentication/

Rob

Hi,

It was exactly that, the key hash. I did the steps in that tutorial again and its working well so far.

Thanks!

Hi,

It was exactly that, the key hash. I did the steps in that tutorial again and its working well so far.

Thanks!