facebook_status

This function returns the status of the facebook connection.

Syntax:

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):


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.


Back: Facebook
Next: facebook_accesstoken
© Copyright YoYo Games Ltd. 2018 All Rights Reserved