Graph API Version

User Accounts

Reading

Facebook Pages this person administers/is an admin for

Graph API Explorer
GET /v2.8/{user-id}/accounts HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{user-id}/accounts'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{user-id}/accounts",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-id}/accounts",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{user-id}/accounts"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • read_page_mailboxes
  • ads_management
  • ads_read
  • manage_pages
  • publish_pages
  • pages_show_list
  • pages_manage_cta
  • pages_manage_instant_articles
  • business_management
  • pages_messaging
  • pages_messaging_phone_number
  • user_managed_groups
Page management Apps
  • manage_pages
  • publish_pages
  • pages_show_list
Other Apps
Permissions are not usually requested.

Parameters

NameDescription
business_id
numeric string or integer

Filter pages by a specific business id

is_business
boolean

If specified, filter pages based on whetherthey are associated with a Business manager or not

is_place
boolean

If specified,filter pages based on whetherthey are places or not.

is_promotable
boolean

If specified, filter pages based on whether they can be promoted or not

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {}, "summary": {} }

data

A list of Page nodes.

The following fields will be added to each node that is returned:

FieldDescription

perms

list<enum>

Permissions of a person on a Page

paging

For more details about pagination, see the Graph API guide.

summary

Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=total_count).

FieldDescription

total_count

int32

Total number of objects on this edge

Validation Rules

ErrorDescription
190Invalid OAuth 2.0 Access Token
100Invalid parameter
210User not visible
3001Invalid query
275Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.