Alain Zelink
Alain Zelink

Reputation: 899

Find all the pages for which a user is an admin using Facebook Graph API

Until now, I was using FQL. I've seen that it's going to be removed (when, I don't know).

When I have obtained the rights to query the user profile, I can find out the pages she manages. Something like the following example. So from page_admin, I get the details of all the pages.

$fql = "select talking_about_count, access_token, description, emails,fan_count,general_info, location, page_url, pic_square, username, page_id,name from page WHERE page_id IN (SELECT page_id FROM page_admin where uid = ".$user['fbuid'].')';

$fql = 'https://graph.facebook.com/'.$user['fbuid'].'/fql?access_token='.$user['token'].'&q='.urlencode($fql);

I cannot find the equivalent using the graph API.

Upvotes: 0

Views: 52

Answers (1)

andyrandy
andyrandy

Reputation: 74004

/me/accounts with the manage_pages permission is what you need

Upvotes: 3

Related Questions