Facebook: get list of pages that a user is admin of

后端 未结 10 497
陌清茗
陌清茗 2020-12-07 08:50

I\'m using the graph api.

I have a logged in user, and want to get back a list of page ids of all the pages that the user is an admin of.

Is there a way of d

10条回答
  •  春和景丽
    2020-12-07 09:29

    I solved it with some FQL:

    FB.api({method: 'fql.multiquery',
            access_token: ,
            queries: {
                query1: 'select page_id from page_admin where uid = ' + ,
                query2: 'select page_id, name, page_url from page where page_id in (select page_id from #query1)'
            }
           }, function(queries){
               var pages = queries[1].fql_result_set;
           }}
    

提交回复
热议问题