The profile picture of a Facebook Page.
Get the profile picture of a Facebook Page.
MANAGE task on the Page.GET /v24.0/{page-id}/picture?redirect=0 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}/picture?redirect=0', '{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}/picture", { "redirect": "0" }, function (response) { if (response && !response.error) { /* handle the result */ } } );Bundle params = new Bundle(); params.putString("redirect", "0"); /* make the API call */ new GraphRequest( AccessToken.getCurrentAccessToken(), "/{page-id}/picture", params, HttpMethod.GET, new GraphRequest.Callback() { public void onCompleted(GraphResponse response) { /* handle the result */ } } ).executeAsync();NSDictionary *params = @{ @"redirect": @"0", }; /* make the API call */ FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"/{page-id}/picture" parameters:params HTTPMethod:@"GET"]; [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { // Handle the result }];curl -X GET -G \ -d 'redirect=0' \ -d 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v24.0/{page-id}/picture| Parameter | Description |
|---|---|
heightinteger | The height of this picture in pixels. |
redirectboolean | Default value: trueBy default the picture edge will return a picture instead of a JSON response. If you want the picture edge to return JSON that describes the image set |
typeenum{small, normal, album, large, square} | The size of this picture. It can be one of the following values: small, normal, large, square. |
widthinteger | The width of this picture in pixels. |
Reading from this edge will return a JSON formatted result:
{ "
data": [], "paging": {} }
datapaging| Error | Description |
|---|---|
| 190 | Invalid OAuth 2.0 Access Token |
| 200 | Permissions error |
| 368 | The action attempted has been deemed abusive or is otherwise disallowed |
| 100 | Invalid parameter |
| 459 | The session is invalid because the user has been checkpointed |
| 80001 | There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
| 104 | Incorrect signature |
| 483 | The session is invalid because the user is in consent app blocking |
picture edge from the following paths: MANAGE task on the Page.| Parameter | Description |
|---|---|
android_key_hashstring | Android key hash for the proxied app ID. |
burn_media_effectboolean | burn_media_effect |
captionUTF-8 string | The caption for a profile pic Supports Emoji |
composer_session_idstring | Composer session ID |
frame_entrypointstring | frame_entrypoint |
has_umgboolean | Whether or not the picture uploaded has edits made in the unified media gallery |
heightint64 | Height for crop |
ios_bundle_idstring | iOS bundle ID for the proxied app ID. |
media_effect_idslist<int> | Set of Media Effect IDs that were used on this pic |
media_effect_source_object_idint | The FBID of the media from which the effects were sourced. |
msqrd_mask_idstring | MSQRD mask ID that was used to create this pic Deprecated |
photonumeric string | ID of the photo to use as the profile pic |
pictureURL | URL of the picture to upload |
profile_pic_methodstring | Method of the profile pic change for logging |
profile_pic_sourcestring | Source of the profile pic change for logging |
proxied_app_idint | ID of the proxied app that performed this action |
qnstring | Waterfall logger session ID |
reuseboolean | Whether to reuse an existing profile pic |
scaled_crop_rectObject | Dictionary with fractional (scaled) keys x/y/width/height for crop |
set_profile_photo_shieldstring | Whether to set Women in Emerging Markets Profile Photo Safety Shield on or off |
sticker_idint | Sticker ID for profile pics with sticker overlays |
sticker_source_object_idint | The FBID of the source media |
suppress_storiesboolean | suppress_stories |
widthint64 | Width for crop |
xint64 | Top-left x-coordinate for crop |
yint64 | Top-left y-coordinate for crop |
success: bool, | Error | Description |
|---|---|
| 368 | The action attempted has been deemed abusive or is otherwise disallowed |
| 240 | Desktop applications cannot call this function for other users |
| 200 | Permissions error |
| 324 | Missing or invalid image file |
| 190 | Invalid OAuth 2.0 Access Token |