An individual post in a profile's feed. The profile could be a user, page, app, or group.
A Facebook Feed story
| Name | Description |
|---|---|
| Page Public Content Access | This feature permission may be required. |
pages_manage_posts permission and Page Public Content Access Feature are required to read publicly shared Page posts. The person requesting the access token must be an admin of the Page.user_posts permission.user_posts permission. However, in some cases the post's owner's privacy settings may not allow your application to access it.The following fields for /page/feed, /page/posts, /pageposts, and /page/published_posts were deprecated in v3.3:
captiondescriptionlinknameobject_idsourcetypeGET /v24.0/{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(
'/{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(
"/{post-id}",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{post-id}",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{post-id}"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];| Field | Description |
|---|---|
idtoken with structure: Post ID | The post ID. |
actionslist | Action links |
admin_creatorBusinessUser|User|Application | The admin creator of a Page Post. Only available if there exists more than one admin for the page. |
allowed_advertising_objectiveslist<string> | The only objectives under which this post can be advertised |
application | Information about the app this post was published by. |
backdated_timedatetime | The backdated time for backdate post. For regular post, this field will be set to null. |
call_to_actionstruct with keys: type, value | The call to action type used in any Page posts for mobile app engagement ads. |
can_reply_privatelybool | Whether the page viewer can send a private reply to this post |
captionstring | The caption of a link in the post (appears beneath the name). |
child_attachmentslist | Sub-shares of a multi-link share post |
comments_mirroring_domainstring | If comments are being mirrored to an external site, this function returns the domain of that external site. |
coordinatesstruct 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_timedatetime | The time the post was published, expressed as UNIX timestamp |
descriptionstring | A description of a link in the post (appears beneath the caption). |
If this Post has a place, the event associated with the place | |
expanded_heightunsigned int32 | An array of information about the attachment to the post |
expanded_widthunsigned int32 | An array of information about the attachment to the post |
feed_targetingstruct 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). |
fromUser|Page | The ID of the user, page, group, or event that published the post |
full_picturestring | If the photo's largest dimension exceeds 720 pixels, it is resized, with the largest dimension set to 720. |
heightunsigned int32 | An array of information about the attachment to the post |
iconstring | A link to an icon representing the type of this post. |
is_app_sharebool | Whether or not the post references an app |
is_eligible_for_promotionbool | Whether the post is eligible for promotion. |
is_expiredbool | Whether the post has expiration time that has passed |
is_hiddenbool | Whether a post has been set to hidden |
is_inline_createdbool | Returns True if the post was created inline when creating ads. |
is_popularbool | Whether the post is currently popular. Based on whether the total actions as a percentage of reach exceeds a certain threshold |
is_publishedbool | 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_sphericalbool | Whether the post is a spherical video post |
linkuri | A description of a link in the post (appears beneath the caption). |
messagestring | The message written in the post |
message_tagslist | Profiles mentioned or tagged in a message. This is an object with a unique key for each mention or tag in the message. |
multi_share_end_cardbool | Whether display the end card for a multi-link share post |
multi_share_optimizedbool | Whether automatically select the order of the links in multi-link share post when used in an ad |
namestring | The name of the link. |
object_idstring | The ID of any uploaded photo or video attached to the post. |
parent_idtoken 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_urluri | 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 |
token with structure: Post ID | ID of post to use for promotion for stories that cannot be promoted directly |
propertieslist | A list of properties for any attached video, for example, the length of the video. |
scheduled_publish_timefloat | UNIX timestamp of the scheduled publish time for the post |
sharesstruct with keys: count | Number of times the post has been shared |
sourcestring | A URL to any Flash movie or video file attached to the post. |
status_typestring | Description of the type of a status update. |
storystring | 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_tagslist | The list of tags in the post description |
subscribedbool | Whether user is subscribed to the post |
The profile this was posted on if different from the author | |
targetingstruct 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_visibilitystring | Timeline visibility information of the post |
typestring | A string indicating the object type of this post. |
updated_timedatetime | The time the post was last updated. This does not include comments received on the post. |
viaUser|Page | ID of the user or Page the post was shared from |
widthunsigned int32 | An array of information about the attachment to the post |
| Edge | Description |
|---|---|
Edge<StoryAttachment> | Any attachments that are associated with the story |
Edge<Comment> | Comments made on this |
Edge<RTBDynamicPost> | All dynamic ad creatives |
Edge<InsightsResult> | Insights for this post (only for Pages). |
Edge<Profile> | People who reacted on this |
Edge<Post> | Shared posts |
Edge<Page> | An array sponsor pages tagged in the post |
Edge<Profile> | Profiles mentioned or targeted in this post. |
| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 368 | The action attempted has been deemed abusive or is otherwise disallowed |
| 200 | Permissions error |
| 459 | The session is invalid because the user has been checkpointed |
| 104 | Incorrect signature |
| 190 | Invalid OAuth 2.0 Access Token |
| 2500 | Error parsing graph query |
| 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. |
| 210 | User not visible |
You can publish posts by using the /{user-id}/feed, /{page-id}/feed, /{event-id}/feed, or /{group-id}/feed edges.
When creating a Post for a Page if you use a user access token the post will be in the voice of the user that posted it. If you use a page access token, the post will be in the voice of the page.