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:
caption
description
link
name
object_id
source
type
GET /v20.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 |
---|---|
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>
|
The only 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. |
can_reply_privately
bool
|
Whether the page viewer can send a private reply to this post |
caption
string
|
The caption of a link in the post (appears beneath the name). |
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 |
description
string
|
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_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
|
If the photo's largest dimension exceeds 720 pixels, it is resized, with the largest dimension set to 720. |
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_inline_created
bool
|
Returns True if the post was created inline when creating ads. |
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 |
link
uri
|
A description of a link in the post (appears beneath the caption). |
message
string
|
The message written in the post |
message_tags
list
|
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_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 |
name
string
|
The name of the link. |
object_id
string
|
The ID of any uploaded photo or video attached to the post. |
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 |
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 |
source
string
|
A URL to any Flash movie or video file attached to the post. |
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 |
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 |
type
string
|
A string indicating the object type of this 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 |
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 |
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. |
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.