facebook_check_permission(permission)
Argument | Description |
---|---|
permission | The permission you want to check (a string). |
Returns: Real
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.
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.