Facebook API can give the pages a user admins. Suppose that it returns me the following array. Unfortunately it does not return the name of it or a url.
This turns me a list of page IDs.
$results = $facebook->api('/fql', array('q'=>'SELECT page_id, type FROM page_admin WHERE uid = me()'));
foreach($results['data'] as $result) {
echo $result['page_id'], '<br />';
}
Using the follow I echo the name of the page ID.
$pagename = $facebook->api('/fql', array('q'=>'SELECT name FROM page WHERE page_id = 230127303706132'));
echo $pagename['data'][0]['name'];
My question is how can I have a list of the page names in an efficient way?
My guess is that I have to put the query inside the foreach loop.