This code initialises Facebook.


GML Code Example


Returns: N/A


Before using any of the Facebook functions you must call this function to initialize the Facebook API and tell GameMaker: Studio that you are going to be using the Facebook specific functions. This should be done only once in the game and can be done at any time, but it is recommended that you call this function right at the start before anything else. Note too, that even if you use facebook_logout at some point in your game you will not need to use this function again to log in.


GML Code Example

 var permissions = ds_list_create();
 ds_list_add(permissions,"public_profile", "user_friends");

The above code initialises Facebook, then creates a ds_list to hold the specific permissions that you wish to request, and finally logs in using these permissions.

Back: Facebook

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