I am trying to log into Corona Cloud using Facebook and ran into some issues. On a side note, I have had success with logging in/signing up into corona cloud via email.
One thing I found that is not documented yet, is that you need to request the “email” permission or you’ll get an error when you use the authToken with corona cloud saying that you need a token with the email permission.
So first I do:
[lua]facebook.login( “XXXXXX”, listenerFunction, {“publish_stream”,“email”} )[/lua]
And in the listenerFunction, I save the event.token that comes when event.type == “session” and event.phase == “login”
And I retrieve some user info:
[lua]facebook.request( “me?fields=id,name,username,gender,timezone,picture” )[/lua]
I use the “id” I get from that request,along with the token to log into coronaCloud.
[lua]coronaCloud.loginFacebook( id, token )[/lua]
The “loginSuccess” successfully fires, and I see that coronaCloud now has an authToken of its own.
So all that seems to work. Now, here is the problem. When I try coronaCloud.getMyProfile(), I get an error.
In the event handler for “MyProfile”, event.results.error = “User authentication token is invalid”
And that is where I am stuck. The error message seems to suggest I received a bad auth token from corona cloud? But the login was successful?
