facebook_request_read_permissions(permissions)
Argument | Description |
---|---|
permissions | The permissions you want to have from the user. |
Returns: Real
With this function you can request additional read permissions for Facebook. These permissions are added (as strings) to a previously created ds_list which is then used in the function to send the
request. The user must be successfully logged in (ie. they have called facebook_login) and the facebook_status
should be "AUTHORISED" before you call this function. the functon returns a unique ID value for the request call or -1 if the request was not sent (for example, the user is not logged in).
This function will trigger an Asynchronous Social Event, which contains the ds_map async_load. This ds_map will be populated
with various key/value pairs to report the success or failure of the request.
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 som eof the Facebook read permissions, and if the game has not requested them, a request is sent.