Facebook api: show dialog window for the user select page (manage_pages extendend perm)

馋奶兔 提交于 2020-01-04 05:57:46

问题


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'});
});

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.

Thanks for your help


回答1:


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.



来源:https://stackoverflow.com/questions/3397716/facebook-api-show-dialog-window-for-the-user-select-page-manage-pages-extenden

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!