Graph API Version

Album /{album-id}

Represents a photo album. The /{album-id} node returns a single album.

Reading

Get information about an album.

Requirements

For Albums on Users and Pages

  • Any valid access token if the album is public.
  • A user access token with user_photos permission to retrieve any albums that the session user has uploaded.

For Albums on Groups

  • A User access token of an Admin of the Group with the user_photos permission.

Graph API Explorer
GET /v5.0/{album-id} 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(
    '/{album-id}',
    '{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(
    "/{album-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{album-id}",
    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:@"/{album-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Fields

Name Description Type

id

The album ID.

string

can_upload

Whether the viewer can upload photos to this album.

boolean

count

The approximate number of photos in the album. This is not necessarily an exact count

int

cover_photo

The ID of the album's cover photo.

Photo

created_time

The time the album was initially created.

datetime

description

The description of the album.

string

event

The event associated with this album.

Event

from

The current user, if the current user created the album.

User

link

A link to this album on Facebook.

string

location

The textual location of the album.

string

name

The title of the album.

string

place

The place associated with this album.

Page

privacy

The privacy settings for the album.

string

type

The type of the album.

enum{app, cover, profile, mobile, wall, normal, album}

updated_time

The last time the album was updated.

datetime

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.