Graph API Version
Page Albums
Page Albums
Reading
Photo albums for this Page
GET /v2.9/{page-id}/albums HTTP/1.1
Host: graph.facebook.com/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
$session,
'GET',
'/{page-id}/albums'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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
ads_managementmanage_pagespages_show_list
manage_pages
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
| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 200 | Permissions error |
| 210 | User not visible |
Creating
You can make a POST request toalbums edge from the following paths: /{page_id}/albums
When posting to this edge, an Album will be created.
Permissions
Developers usually request these permissions for this endpoint:Marketing Apps
ads_managementmanage_pagespublish_pages
manage_pagespublish_pages
No data
Parameters
| Name | Description |
|---|---|
contributorslist<int> | Contributors to turn this into a shared album |
descriptionUTF-8 string | Deprecated. Use the message param DeprecatedSupports Emoji |
is_defaultboolean | Default value: false
|
locationstring | A text location of the album for non-page locations |
make_shared_albumboolean | Default value: falseEnsures the created album is a shared album |
messagestring | The album's caption. This appears below the title of the album in the album view |
nameUTF-8 string | The title of the album Supports Emoji |
placeplace tag | The ID of a location page to tag the album with |
privacyPrivacy Parameter | The privacy of the album |
tagslist<int> | Deprecated Deprecated |
visiblestring | 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
| Error | Description |
|---|---|
| 200 | Permissions error |
| 100 | Invalid parameter |
| 2010 | Photos calls have been temporarily disabled for this application |