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?
+2
A:
I found the answer, you need to use FQL, passing in the appropriate access_token:
rmorrison
2010-06-10 00:13:11
A:
@rmorrison - This is not graph API though. With the new "like" addition, you can use this URL: h ttps://graph.facebook.com/me/likes?access_token=blah! or h ttps://graph.facebook.com/USER_ID/likes?access_token=blah!
gsharma
2010-06-18 03:38:44
He's not looking for "likes", he's looking for pages the user administrates.
Daniel Schaffer
2010-08-12 14:23:10
Do you know how to perform a like action on a page?
Tristan
2010-10-01 01:01:27
+3
A:
The accounts
property on the user
object says:
The Facebook pages owned by the current user. If the manage_pages permission has been granted, this connection also yields access_tokens that can be used to query the Graph API on behalf of the page.
dar
2010-08-12 14:21:42
Ooh this must be new... never noticed that connection before! Although, I'm not sure this is the right answer. You can be an admin on a page without being the "owner".
Daniel Schaffer
2010-08-12 14:24:42
It looks like the right answer to me, it returns all pages I'm an admin on, even the ones I did not create myself.
dar
2010-08-12 17:32:20
+4
A:
Hello,
After getting access token you can get all details of list of all of the facebook pages that the user administers.
https://graph.facebook.com/[FACEBOOKUSERID]?metadata=1&access_token=
The output will look like
{
"name": "Facebook Developer Garage Austin - SXSW Edition",
"metadata": {
"connections": {
"feed": "http://graph.facebook.com/331218348435/feed",
"picture": "https://graph.facebook.com/331218348435/picture",
"invited": "https://graph.facebook.com/331218348435/invited",
"attending": "https://graph.facebook.com/331218348435/attending",
"maybe": "https://graph.facebook.com/331218348435/maybe",
"noreply": "https://graph.facebook.com/331218348435/noreply",
"declined": "https://graph.facebook.com/331218348435/declined"
}
}
}
PrateekSaluja
2010-09-14 13:16:31