With this function you can poll Facebook for the current status of the connection. One of the following strings is returned (note that they are always returned in capital letters):
- AUTHORISED: This means that the user has logged in correctly, but not all permissions may have been granted.
- PROCESSING: This is returned when the login process is currently un-resolved.
- IDLE: This is returned when the connection has been initialised but no further action has been taken.
- FAILED: This means that the user has not logged in correctly, usually due to a connection error.
case "AUTHORISED": global.Auth = true; instance_destroy(); break;
case "FAILED": facebook_login(permissions); alarm = 30; break;
default: alarm = 30;
The above code would be run in an alarm and checks the status of Facebook to see if the user has logged in correctly. If the return string is "AUTHORISED", a global variable is set to true and the game continues, if the return string is "FAILED" the game will request that the user logs in again and then repeat the alarm to check the status once more.