Represents an Album.
Requirements depend on the type of node that the Album is on.
| Requirement | User nodes | Page nodes | Group nodes |
|---|---|---|---|
Any | Any | ||
None | To get public Page content of Pages you can not perform a task on, you will need | None | |
Unpublished Pages:
Published Pages: | None | ||
Not applicable | Not applicable | Admin |
Requirements depend on the type of node that the Album is on.
| Requirement | User nodes | Page nodes | Group nodes |
|---|---|---|---|
Any | Any | ||
None | To get public Page content of Pages you can not perform a task on, you will need | None | |
Unpublished Pages:
Published Pages: | None | ||
Not applicable | Not applicable | Admin |
GET /v10.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
}];| Field | Description |
|---|---|
idnumeric string | The Album ID. |
backdated_timedatetime | A user-specified time for when this object was created |
backdated_time_granularityenum | How accurate the backdated time is |
can_uploadbool | Whether the app user can upload photos to this Album |
countunsigned int32 | |
cover_photo | Album cover photo id |
created_timedatetime | The Album creation date and time. |
descriptionstring | The Album description. |
If this object has a place, the event associated with the place | |
fromUser|Page | The User who created the Album. |
linktoken with structure: URL | A link to this Album on Facebook. |
locationstring | The Album textual location. |
namestring | The Album title. |
place | Place info |
privacystring | The Album privacy settings. |
typestring | The Album type: album, app, cover, profile, mobile, normal, or wall |
updated_timedatetime | The date and time the Album was last updated. |
| Error | Description |
|---|---|
| 200 | Permissions error |
| 100 | Invalid parameter |
albums edge from the following paths: | Parameter | 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 |
id in the return type.id: numeric string, | Error | Description |
|---|---|
| 200 | Permissions error |
| 100 | Invalid parameter |
| 190 | Invalid OAuth 2.0 Access Token |