Graph API Version

Page Albums

Reading

Photo albums for this Page

Example

Graph API Explorer
GET /v2.11/{page-id}/albums HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{page-id}/albums',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{page-id}/albums",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/albums",
    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:@"/{page-id}/albums"
                                      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
No data
Page management Apps
  • manage_pages
  • pages_show_list
Other Apps
Permissions are not usually requested.

Parameters

This endpoint doesn't have any parameters.

Fields

Reading from this edge will return a JSON formatted result:

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

data

A list of Album nodes.

paging

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

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error

Creating

Example

You can make a POST request to albums edge from the following paths:
When posting to this edge, an Album will be created.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
No data
Page management Apps
  • manage_pages
  • publish_pages
  • pages_show_list
Other Apps
No data

Parameters

NameDescription
contributors
list<int>

Contributors to turn this into a shared album

description
UTF-8 string

Deprecated. Use the message param

DeprecatedSupports Emoji
is_default
boolean
Default value: false

true indicates that the request will create the application specific album

location
string

A text location of the album for non-page locations

make_shared_album
boolean
Default value: false

Ensures the created album is a shared album

message
string

The album's caption. This appears below the title of the album in the album view

name
UTF-8 string

The title of the album

Supports Emoji
place
place tag

The ID of a location page to tag the album with

privacy
Privacy Parameter

The privacy of the album

tags
list<int>

Deprecated

Deprecated
visible
string

Deprecated. Use privacy

Deprecated

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct {
id: numeric string,
}

Validation Rules

ErrorDescription
200Permissions error
100Invalid parameter
2010Photos calls have been temporarily disabled for this application
16500Album description is too long.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.