Facebook 如何检查用户是否已授予发布操作权限

Facebook 如何检查用户是否已授予发布操作权限,facebook,facebook-opengraph,Facebook,Facebook Opengraph,我设法请求了“发布”操作权限,但由于该权限可以从“帐户设置”页面的“应用程序”选项卡中撤销,因此我还必须能够检查该权限是否仍然被授予。我尝试了以下方法: // Check for publish_actions extended permission var query = FB.Data.query('select publish_actions from permissions where uid={0}', fbuid); query.wait(function(rows) { i

我设法请求了“发布”操作权限,但由于该权限可以从“帐户设置”页面的“应用程序”选项卡中撤销,因此我还必须能够检查该权限是否仍然被授予。我尝试了以下方法:

// 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');
    }
});
例如,这种方法确实适用于“发布\u流”权限,但不适用于“发布\u操作”权限。如果有人能帮忙,我会很高兴的,我很沮丧

更新
类型错误。它有效,抱歉:

我已经更新了我自己的问题,所以答案是问题中的代码