facebook_check_permission

Check to see if the user has specific publishing or read actions from the Facebook API.

Syntax:

GML Code Example

facebook_check_permission(permission)


Argument Description
permission The permission you want to check (a string).


Returns: Real


Description

With this function you can check the Facebook API to see if the user has granted a specific permission, either read or publish. The function will return true if they have the permission or false if they do not or there is an error. Note that the user must be logged in for the check to function.


Example:

GML Code Example

var permissions = ds_list_create();
 if !facebook_check_permission("user_likes")
    {
    ds_list_add(permissions, "user_likes");
    }
 if !facebook_check_permission("user_interests")
    {
    ds_list_add(permissions, "user_interests");
    }
 if !ds_list_empty(permissions))
    {
    request_ID = facebook_request_read_permissions(permissions);
    }
 ds_list_destroy(permissions);
 

The above code checks some of the Facebook read permissions, and if the game has not requested them, a request is sent.





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