facebook_request_read_permissions

Request specific read actions from the Facebook API.

Syntax:

GML Code Example

facebook_request_read_permissions(permissions)


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


Returns: Real


Description

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.


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 som eof 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