FAPI.UI.showPermissions

Allow application to request access to permissions from user.

The application can check whether the access is granted with method users.hasAppPermission.

Example

Ask permission:

var permissions = '"PHOTO_CONTENT";"VALUABLE_ACCESS"';
 
function askSetStatusPermission() {
    FAPI.UI.showPermissions("[" + permissions + "]");
}

Check permission:

var permission = "PHOTO_CONTENT";
function checkPermission() {
    var callback = function(status, result, data) {
        if (result){
            alert("Exists!");
        } else {
            alert("Permission is missed");
        }
    }
    FAPI.Client.call({"method":"users.hasAppPermission", "ext_perm":permission}, callback);
}