facebook_request_publish_permissions


Syntax:

facebook_request_publish_permissions(permissions)

Argument Description
permissions The permissions you want to have from the user.


Returns:

Real


Description

With this function you can request additional publishing 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.


Example:

var request = "publish_actions";
if !facebook_check_permission(request)
   {
   var permissions = ds_list_create();
   ds_list_add(permissions, request);
   request_ID = facebook_request_publish_permissions(permissions);
   ds_list_destroy(permissions);
   }

The above code checks the current Facebook permissions, and if the game has not requested the "publish_actions" permission, then a request is sent.