Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Objects
    • Achievement(Instance)
    • Album
    • App and Game Groups
    • Application
    • Checkin
    • Comment
    • Domain
    • Errors
    • Event
    • Field Expansion
    • FriendList
    • Group
    • Insights
    • Link
    • Message
    • Note
    • Offer
    • Order
    • Page
    • Pagination
    • Payment
    • Photo
    • Pictures
    • Post
    • Privacy Parameter
    • Publishing
    • Question
    • QuestionOption
    • Realtime Updates
    • Review
    • Search
    • Selecting Results
    • Status message
    • Thread
    • User
    • Video

Post

Facebook APIs › Graph API › Post

An individual entry in a profile's feed as represented in the Graph API.

The User, Page, Application and Group objects have feed connections containing post objects that represent their walls. In addition the User and Page objects have a connection named posts containing Posts made by the User and the Page respectively.

Example

A post from Facebook Platform:

https://graph.facebook.com/19292868552_10150189643478553


Fields

A Post has the following fields.

Querying without the read_stream permission will return only the public view of the data (i.e. data that can be see when the user is logged out).

NameDescriptionPermissionsReturns
id

The post ID

Requires access_token

string

from

Information about the user who posted the message

Requires access_token

object containing the name and Facebook id of the user who posted the message

to

Profiles mentioned or targeted in this post

Requires access_token

Contains in data an array of objects, each with the name and Facebook id of the user

message

The message

Requires access_token

string

message_tags

Objects tagged in the message (Users, Pages, etc)

Requires access_token

object containing fields whose names are the indexes to where objects are mentioned in the message field; each field in turn is an array containing an object with id, name, offset, and length fields, where length is the length, within the message field, of the object mentioned

picture

If available, a link to the picture included with this post

Requires access_token

string containing the URL

link

The link attached to this post

Requires access_token

string containing the URL

name

The name of the link

Requires access_token

string

caption

The caption of the link (appears beneath the link name)

Requires access_token

string

description

A description of the link (appears beneath the link caption)

Requires access_token

string

source

A URL to a Flash movie or video file to be embedded within the post

Requires access_token

string containing the URL

properties

A list of properties for an uploaded video, for example, the length of the video

Requires access_token

array of objects containing the name and text

icon

A link to an icon representing the type of this post

Requires access_token

string

actions

A list of available actions on the post (including commenting, liking, and an optional app-specified action)

Requires access_token

array of objects containing the name and link

privacy

The privacy settings of the Post

read_stream

A JSON object with fields described here

type

A string indicating the type for this post (including link, photo, video)

Requires access_token

string

likes

Likes for this post

Requires access_token

Structure containing a data object and the count of total likes, with data containing an array of objects, each with the name and Facebook id of the user who liked the post

place

Location associated with a Post, if any

read_stream

object containing id and name of Page associated with this location, and a location field containing geographic information such as latitude, longitude, country, and other fields (fields will vary based on geography and availability of information)

story

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 these stories

read_stream

string

story_tags

Objects (Users, Pages, etc) tagged in a non-intentional story; you must have the "Include recent activity stories" migration enabled in your app to retrieve these tags

read_stream

object containing fields whose names are the indexes to where objects are mentioned in the message field; each field in turn is an array containing an object with id, name, offset, and length fields, where length is the length, within the message field, of the object mentioned

with_tags

Objects (Users, Pages, etc) tagged as being with the publisher of the post ("Who are you with?" on Facebook)

read_stream

objects containing id and name fields, encapsulated in a data[] array

comments

Comments for this post

read_stream

Structure containing a data object containing an array of objects, each with the id, from, message, and created_time for each comment

object_id

The Facebook object id for an uploaded photo or video

read_stream

number

application

Information about the application this post came from

read_stream

object containing the name and id of the application

created_time

The time the post was initially published

read_stream

string containing ISO-8601 date-time

updated_time

The time of the last comment on this post

read_stream

string containing ISO-8601 date-time

include_hidden

Whether to include posts that have been set to Hidden from Timeline

read_stream

boolean

status_type

Type of post

read_stream

One of mobile_status_update, created_note, added_photos, added_video, shared_story, created_group, created_event, wall_post, app_created_story, published_story, tagged_in_photo, approved_friend

Delete

You can delete a post as long as your application created the post. You delete a post by issuing an HTTP DELETE request to the POST_ID object with publish_stream permission.

If the delete is successful, you get the following return.

Description Type
If the delete succeeded boolean

Connections

A Post has the following connections.

NameDescriptionPermissionsReturns
comments

All of the comments on this post.

Any valid access_token.

array of objects containing id, from, message and created_time fields.

likes

The likes on this post.

Any valid access_token.

array of objects containing the id and name fields.

insights

Insights information for this Post, If this Post is from a Facebook Page.

A valid access_token with read_insights permission for a user authorized to view the Page's insights.

array of Insights objects. See the Insights documentation for more information.

comments

Create

You can write to the POST_ID/comments connection to post a comment to the post by issuing an HTTP POST request with the publish_stream permission and following parameters.

Parameter Description Type Required
message Comment text string yes

If the write is successful, you get the following return.

Name Description Type
id The new comment ID string

Delete

You can delete a comment by issuing an HTTP DELETE request to the COMMENT_ID object with the publish_stream permission.

If the delete is successful, you get the following return.

Description Type
If the delete succeeded boolean

likes

Create

You can like a Post by issuing a HTTP POST request to the POST_ID/likes connection with the publish_stream permission. You can suppress the notification created when liking a Post by passing a notify parameter with value of false.

If the write is successful, you get the following return.

Description Type
If the like succeeded boolean

Delete

You can unlike a post by issuing an HTTP DELETE request to the POST_ID/likes connection with the publish_stream permission.

If the delete is successful, you get the following return.

Description Type
If the unlike succeeded boolean
Updated on Friday
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy