Graph API Version

Page Post

Reading

Feature Permissions

NameDescription
Page Public Content AccessThis feature permission may be required.

A Facebook feed story

Permissions

The source field will not be returned for Page-owned videos unless the User making the request is an admin of the owning Page.

Example

Graph API Explorer
GET /v4.0/{page-id}_{post-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(
    '/{page-id}_{post-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(
    "/{page-id}_{post-id}/",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}_{post-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:@"/{page-id}_{post-id}/"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
curl https://graph.facebook.com/v4.0/{page-id}_{post-id}/
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription
id
token with structure: Post ID

The post ID

actions
list

Action links

admin_creator
BusinessUser|User|Application

The admin creator of a Page Post. Only available if there exists more than one admin for the page.

allowed_advertising_objectives
list<string>

Objectives under which this post can be advertised

application

Information about the app this post was published by.

backdated_time
datetime

The backdated time for backdate post. For regular post, this field will be set to null.

call_to_action
struct with keys: type, value

The call to action type used in any Page posts for mobile app engagement ads.

child_attachments
list

Sub-shares of a multi-link share post

comments_mirroring_domain
string

If comments are being mirrored to an external site, this function returns the domain of that external site.

coordinates
struct with keys: checkin_id, author_uid, page_id, target_id, target_href, coords, tagged_uids, timestamp, message, target_type

An array of information about the attachment to the post

created_time
datetime

The time the post was published, expressed as UNIX timestamp

event

If this Post has a place, the event associated with the place

expanded_height
unsigned int32

An array of information about the attachment to the post

expanded_width
unsigned int32

An array of information about the attachment to the post

feed_targeting
struct with keys: country, cities, regions, genders, age_min, age_max, education_statuses, college_years, relationship_statuses, interests, interested_in, user_adclusters, locales, countries, geo_locations, work_positions, work_employers, education_majors, education_schools, family_statuses, life_events, industries, politics, ethnic_affinity, generation, fan_of, relevant_until_ts

Object that controls news feed targeting for this post. Anyone in these groups will be more likely to see this post, others will be less likely, but may still see it anyway. Any of the targeting fields shown here can be used, none are required (applies to Pages only).

from
User|Page

The ID of the user, page, group, or event that published the post

full_picture
string

Full size picture from attachment

height
unsigned int32

An array of information about the attachment to the post

icon
string

A link to an icon representing the type of this post.

is_app_share
bool

Whether or not the post references an app

is_eligible_for_promotion
bool

Whether the post is eligible for promotion.

is_expired
bool

Whether the post has expiration time that has passed

is_hidden
bool

Whether a post has been set to hidden

is_popular
bool

Whether the post is currently popular. Based on whether the total actions as a percentage of reach exceeds a certain threshold

is_published
bool

Indicates whether a scheduled post was published (applies to scheduled Page Post only, for users post and instanlty published posts this value is always true)

is_spherical
bool

Whether the post is a spherical video post

message
string

The message written in the post

message_tags
list

Profiles tagged in message. This is an object with a unique key for each tag in the message

multi_share_end_card
bool

Whether display the end card for a multi-link share post

multi_share_optimized
bool

Whether automatically select the order of the links in multi-link share post when used in an ad

parent_id
token with structure: Post ID

The ID of a parent post for this post, if it exists. For example, if this story is a 'Your Page was mentioned in a post' story, the parent_id will be the original post where the mention happened

permalink_url
uri

The permanent static URL to the post on www.facebook.com. Example: https://www.facebook.com/FacebookforDevelopers/posts/10153449196353553

place

ID of the place associated with the post

privacy

The privacy settings for a post

promotable_id
token with structure: Post ID

ID of post to use for promotion for stories that cannot be promoted directly

properties
list

A list of properties for any attached video, for example, the length of the video.

scheduled_publish_time
float

UNIX timestamp of the scheduled publish time for the post

shares
struct with keys: count

Number of times the post has been shared

status_type
string

Description of the type of a status update.

story
string

Text of stories not intentionally generated by users, such as those generated when two users become friends. You must have the "Include recent activity stories" migration enabled in your app to retrieve this field

story_tags
list

The list of tags in the post description

subscribed
bool

Whether user is subscribed to the post

target

The profile this was posted on if different from the author

targeting
struct with keys: country, cities, regions, zips, genders, college_networks, work_networks, age_min, age_max, education_statuses, college_years, college_majors, political_views, relationship_statuses, interests, keywords, interested_in, user_clusters, user_clusters2, user_clusters3, user_adclusters, excluded_user_adclusters, custom_audiences, excluded_custom_audiences, locales, radius, connections, excluded_connections, friends_of_connections, countries, excluded_user_clusters, adgroup_id, user_event, qrt_versions, page_types, user_os, user_device, action_spec, action_spec_friend, action_spec_excluded, geo_locations, excluded_geo_locations, targeted_entities, conjunctive_user_adclusters, wireless_carrier, site_category, work_positions, work_employers, education_majors, education_schools, family_statuses, life_events, behaviors, travel_status, industries, politics, markets, income, net_worth, home_type, home_ownership, home_value, ethnic_affinity, generation, household_composition, moms, office_type, interest_clusters_expansion, dynamic_audience_ids, product_audience_specs, excluded_product_audience_specs, exclusions, flexible_spec, engagement_specs, excluded_engagement_specs

Object that limited the audience for this content. Anyone not in these demographics will not be able to view this content. This will not override any Page-level demographic restrictions that may be in place.

timeline_visibility
string

Timeline visibility information of the post

updated_time
datetime

The time the post was last updated, which occurs when a user comments on the post.

via
User|Page

ID of the user or Page the post was shared from

width
unsigned int32

An array of information about the attachment to the post

Edges

EdgeDescription

Any attachments that are associated with the story

Comments made on this

All dynamic ad creatives

The edit history of the Post

Insights for this post (only for Pages).

People who like this

string

The picture scraped from any link included with the post.

People who reacted on this

People who have seen this

Shared posts

An array sponsor pages tagged in the post

An array of IDs of entities (e.g. users) tagged in this post

Validation Rules

ErrorDescription
100Invalid parameter
80001There 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.
200Permissions error
294Managing advertisements requires an access token with the extended permission for ads_management
275Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.
3001Invalid query
210User not visible

Creating

You can't perform this operation on this endpoint.

Updating

You can update a PagePost by making a POST request to /{page_post_id}.

Example

Graph API Explorer
POST /v4.0/{page-id}_{post-id}/ HTTP/1.1
Host: graph.facebook.com

message=This+is+a+test+value
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->post(
    '/{page-id}_{post-id}/',
    array (
      'message' => 'This is a test value',
    ),
    '{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}_{post-id}/",
    "POST",
    {
        "message": "This is a test value"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("message", "This is a test value");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}_{post-id}/",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"message": @"This is a test value",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{page-id}_{post-id}/"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
curl -X POST \
     -d "message=This+is+a+test+value" \
        https://graph.facebook.com/v4.0/{page-id}_{post-id}/
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
attached_media
list<Object>

attached_media

media_fbid
numeric string

message
UTF-8 string

Supports Emoji
backdated_time
datetime

SELF_EXPLANATORY

backdated_time_granularity
enum{year, month, day, hour, min, none}
Default value: none

SELF_EXPLANATORY

composer_session_id
string

composer_session_id

direct_share_status
int64

The status to allow sponsor directly boost the post.

feed_story_visibility
enum{hidden, visible}

SELF_EXPLANATORY

is_explicit_location
boolean

is_explicit_location

is_hidden
boolean

SELF_EXPLANATORY

is_pinned
boolean

SELF_EXPLANATORY

is_published
boolean

SELF_EXPLANATORY

message
UTF-8 string

SELF_EXPLANATORY

Supports Emoji
og_action_type_id
numeric string or integer

SELF_EXPLANATORY

og_hide_object_attachment
boolean

SELF_EXPLANATORY

og_icon_id
numeric string or integer

SELF_EXPLANATORY

og_object_id
OG object ID or URL string

SELF_EXPLANATORY

og_phrase
string

SELF_EXPLANATORY

og_set_profile_badge
boolean

og_set_profile_badge

og_suggestion_mechanism
string

SELF_EXPLANATORY

place
place tag

SELF_EXPLANATORY

privacy
Privacy Parameter

SELF_EXPLANATORY

product_item
Object

SELF_EXPLANATORY

Supports Emoji
title
string

Supports Emoji
price
float

currency
string
Default value: USD

retail_price
float

shipping_price
float

condition
string
Default value: used

description
string
Default value:

Supports Emoji
pickup_delivery_info
string
Default value:

location_page_id
string
Default value:

price_type
string
Default value: fixed

multiple_item_type
string
Default value: SINGLE_ITEM

category_id
numeric string or integer

predict_category_id
numeric string or integer

predict_leaf_category_id
numeric string or integer

sherlock_image_model_signature
string
Default value:

sherlock_model_id
integer
Default value: 0

sherlock_used_category_feature
enum {FAILED, TEXT_ONLY, IMAGE_ONLY, IMAGE_TEXT, USE_EXISTING_PRODUCT}

latitude
float

longitude
float

quantity
int64

serialized_verticals_data
string
Default value:

commerce_verticals_data
Object

autos_make
string

autos_model
string

autos_year
string

autos_odometer
string

autos_odometer_units
string
Default value:

autos_vin
string

draft_type
enum {COMMERCE_SELL_OPTIONS, FOR_SALE_AUTO}

is_preview
boolean
Default value: false

status_type
enum {COMMERCE_SELL_OPTIONS, DRAFT, NON_INTERACTIVE, INTEGRITY_SNAPSHOT}
Default value: commerce_sell_options

original_commerce_item_id
numeric string or integer

original_for_sale_item_id
numeric string or integer

original_post_id
numeric string or integer

original_product_item_id
numeric string or integer

collection_id
numeric string or integer

graphapi_has_photo_hint_for_loki
boolean

shipping_offered
boolean

delivery_type
enum {IN_PERSON, DROP_OFF}
Default value: in_person

delivery_types
list<enum {IN_PERSON, DROP_OFF, SHIPPING_ONSITE, SHIPPING_OFFSITE}>

shipping_services
list<enum {USPS_PRIORITY, USPS_PRIORITY_EXPRESS, USPS_FIRST, USPS_PARCEL_SELECT}>

parcel_type
enum {USPS_LT_HALF_LBS, USPS_LT_THREE_LBS, USPS_LT_TEN_LBS, USPS_LT_TWENTY_LBS, OVERWEIGHT}

seller_address_id
numeric string or integer

seller_email
string
Default value:

attribute_data
JSON object

brand
string
Default value:

color
string
Default value:

size
string
Default value:

material
string
Default value:

condition
string
Default value:

carrier
string
Default value:

internal_memory
string
Default value:

device_name
string
Default value:

variants
list<JSON object>

id
numeric string or integer

price
float

Required
description
string

Required
quantity
integer

nearby_locations
list<JSON object>

name
string

street_address
string

latitude
float

longitude
float

image_url
string

location_type
string

location_page_id
numeric string or integer

xpost_surface
enum {MARKETPLACE_CROSS_POST_SUGGESTIONS, INVENTORY_MANAGEMENT, GROUP_COMPOSER, MARKETPLACE_COMPOSER}

source_type
string
Default value:

source_post_id_during_creation
string

xpost_target_ids
list<string>

product_hashtag_names
list<string>

suggested_hashtag_names
list<string>

created_through_nlu_conversion
boolean

in_search_of_listing_type
enum {IN_SEARCH_OF, FOR_SALE}
Default value: for_sale

scheduled_publish_time
int64

SELF_EXPLANATORY

should_sync_product_edit
boolean

should_sync_product_edit

source_type
string

source_type

sponsor_id
numeric string or integer

Facebook Page id that is tagged as sponsor in the feed post

sponsor_relationship
int64

Sponsor Relationship, such as Presented By or Paid PartnershipWith

tags
list<int>

SELF_EXPLANATORY

text_format_preset_id
numeric string or integer

text_format_preset_id

timeline_visibility
enum{hidden, normal, forced_allow}

SELF_EXPLANATORY

tracking
JSON-encoded string

SELF_EXPLANATORY

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error
368The action attempted has been deemed abusive or is otherwise disallowed
190Invalid OAuth 2.0 Access Token
475You have been temporarily blocked from posting videos because you added videos containing content that may belong to someone else.
102Session key invalid or no longer valid

Deleting

You can delete a PagePost by making a DELETE request to /{page_post_id}.

Example

Graph API Explorer
DELETE /v4.0/{page-id}_{post-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->delete(
    '/{page-id}_{post-id}/',
    array (),
    '{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}_{post-id}/",
    "DELETE",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}_{post-id}/",
    null,
    HttpMethod.DELETE,
    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}_{post-id}/"
                                      parameters:params
                                      HTTPMethod:@"DELETE"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
curl -X DELETE \
        https://graph.facebook.com/v4.0/{page-id}_{post-id}/
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error