Facebook api:显示用户选择页面的对话框窗口(manage_pages extendend perm) [英] Facebook api: show dialog window for the user select page (manage_pages extendend perm)

查看:30
本文介绍了Facebook api:显示用户选择页面的对话框窗口(manage_pages extendend perm)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望纽约用户给予纽约应用manage_pages"扩展权限,但我希望我的用户能够选择他们授予哪些页面的权限.

I want ny users to give ny app "manage_pages" extended pemission but i want my users to be able to select which of their pages they give permission to.

我有这个代码负责验证和获取用户权限:

I have this code which is responsible to autenticate and get the users permissions:

 $('#btn-connect-facebook').click(function(){
    FB.login(function(response) {
        if (response.session) {
            if (response.perms) {
               -> //new popup window for select which page it gives permissions//
               //window.location = (...) // redirect to php page
            } else {
              alert("You need to grant the required permissions");
            }
        } else {
            alert("There was an error connecting to facebook");
        }
    }, {perms:'manage_pages,publish_stream,read_stream,create_event,offline_access'});
});

我应该如何让用户选择他想要授予权限的页面?.我试过添加 enable_profile_selector 但它弄乱了我的权限(对话框没有请求所有需要的权限.

How should i suppose to make the user choose which page he wants to give permissions?. I have tried add enable_profile_selector but it messes up with my perms (the dialog dont request all the needed permissions.

感谢您的帮助

推荐答案

用户可以授予页面的唯一权限是 publish_stream 权限.所有其他权限都是用户权限.例如,它们不可为页面选择/定制.manage_pages 权限是全有或全无权限.用户可以通过将此权限授予应用程序来允许(所有)页面访问或不允许访问.

The only permission a user can give a page is the publish_stream permission. All other permissions are user permissions. E.g., they are not selectable / customizable for pages. The manage_pages permission is an all or nothing permission. Either the user allows (all) pages access or none by giving this permission to an application.

这篇关于Facebook api:显示用户选择页面的对话框窗口(manage_pages extendend perm)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆