views:

139

answers:

1

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 doing this? The docs are pretty bad - and circular.

+1  A: 

I solved it with some FQL:

FB.api({method: 'fql.multiquery',
        access_token: <access_token>,
        queries: {
            query1: 'select page_id from page_admin where uid = ' + <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;
       }}
EoghanM

related questions