Using Facebook\'s Graph API, given a username xyz (assuming they\'ve authenticated my site), how do I get a list of all of the facebook pages that the user administers?
Here's what I use. It works perfect
$pages = $facebook->api(array('method' => 'fql.query','query' => 'SELECT page_id FROM page_admin WHERE uid = '.$uid.''));
foreach($pages as $k=>$v) {
echo 'page id#:'.$v['page_id'].'
';
}
This is of course after you have the session created for the fb user! The $uid
would be the profile id# of the specific facebook user your returning of a list of managed pages for.