开发者

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

开发者 https://www.devze.com 2023-01-10 05:32 出处:网络
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 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 do开发者_JAVA百科nt request all the needed permissions.

Thanks for your help


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号