How to check if user has granted the publish_actions permission
-
27-10-2019 - |
题
I managed to request the publish_actions permission, but since it is revocable from the Apps tab on the Account Settings page I also must be able to check whether the permission is still granted. I tried it with the following approach:
// Check for publish_actions extended permission
var query = FB.Data.query('select publish_actions from permissions where uid={0}', fbuid);
query.wait(function(rows) {
if(rows[0].publish_actions == 1) {
console.log('The user has granted the extended permission');
} else {
console.log('The user has not granted the extended permission');
}
});
This approach does work with the publish_stream permission for instance but not with the publish_actions permission. Would be very glad if someone could help, I'm totally frustrated.
UPDATE type error. It works, sorry : ]
解决方案
I have updated my own question so the answer is the code in the question.
不隶属于 StackOverflow