facebook_status

This function returns the status of the facebook connection.

Syntax:

GML Code Example

facebook_status()



Returns: String


Description

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.


Example:

GML Code Example

switch (facebook_status())
    {
    case "AUTHORISED": global.Auth = true; instance_destroy(); break;
    case "FAILED": facebook_login(permissions); alarm[0] = 30; break;
    default: alarm[0] = 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.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here