Graph API Version

Album /{album-id}

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

Reading

Graph API Explorer
GET /v2.7/{album-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{album-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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
}];

Permissions

  • 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.

Fields

NameDescriptionType

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 profile that 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

Publishing

You can create new albums by using the /{user-id}/albums, /{page-id}/albums or /{group-id}/albums edges.

Deleting

You can't delete albums using the Graph API.

Updating

You can't update albums using the Graph API.

Edges

Property NameDescription

/picture

The cover photo of this album.

/photos

Photos contained in this album.

/sharedposts

Stream posts that are shares of this album.

/likes

People who like this.

/reactions

People who have reacted to this.

/comments

Comments made on this.