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



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

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

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