Facebook already authorized

Hi there,

In summary, when my app starts, this is what I expect to happen:

  • If not yet authorized : present a button for the user to manually touch in order to call facebook.login(), then if success, load next scene

  • If already authorized : do not present anything, and go to the next scene.

The issue is: if I called facebook.login() to check if the user is logged in, the log in popup would be presented even before the user manually touches to proceed with the log in.

I might be missing something but I can’t see a way to check whether my Facebook appId has already been authorized prior to calling facebook.login().

Any suggestions appreciated! thanks!

When my users log in I usually just save a bool to a userdata json file: hasLoggedIn = true

That way on startup I can read that value and know that the user logged in, without having to check anything on facebook again.

When they logout I reset the bool to false.

Might not be clever, but it’s simple to implement and it’s always worked for me.

When my users log in I usually just save a bool to a userdata json file: hasLoggedIn = true

That way on startup I can read that value and know that the user logged in, without having to check anything on facebook again.

When they logout I reset the bool to false.

Might not be clever, but it’s simple to implement and it’s always worked for me.