F
F
fot2017-02-22 13:32:54
Classmates
fot, 2017-02-22 13:32:54

FAPI.UI.showPermissions from JavaScript SDK not working?

FAPI.UI.showPermissions from JavaScript SDK does not work. I copy-paste from the documentation to myself:
var permissions = '"PHOTO_CONTENT";"VALUABLE_ACCESS"';
function askSetStatusPermission() {
FAPI.UI.showPermissions("[" + permissions + "]");
}

issues a Bad Request (400) and logs out from classmates.
In this case, for example, users.hasAppPermission or FAPI.UI.showPayment work without problems.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vjacheslav Kanivetc, 2017-03-03
@fot

It's better to write like this. And in your example invalid delimiter

FAPI.UI.showPermissions(
    JSON.stringify(
        ["PHOTO_CONTENT","VALUABLE_ACCESS"]
    ));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question