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

Comment

Facebook APIs › Graph API › Comment

A comment on a Graph API object. Read more in our Using Comments guide.

Example

A comment on a post.

https://graph.facebook.com/19292868552_10150189643478553_16210808 (A comment on Post)

Fields

The comment object has the following fields.

NameDescriptionPermissionsReturns
id

The Facebook ID of the comment

generic access_token

string

from

The user that created the comment

generic access_token

object containing the id and name of the creating user

message

The comment text

generic access_token

string

created_time

The timedate the comment was created

generic access_token

string containing ISO-8601 date-time

like_count

The number of times this comment was liked

generic access_token

integer

user_likes

This field is returned only if the authenticated user likes this comment

generic access_token

string; always true

parent

If this comment is a reply, this field returns the parent comment, otherwise no value

generic access_token

reference

can_comment

Specifies whether you can reply to this comment

generic access_token

boolean

comment_count

The number of replies to this comment, if any

generic access_token

integer

Delete

You can delete a comment by issuing a 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

parent

This will return a reference to the parent comment of any comment reply. Read the Using Comments guide to find out more about Creating, Reading and Deleting comments. You can also request fields of the parent comment directly:

GET /{comment_id}?fields=parent.fields(comment_count)

Connections

The Comment object has the following connections.

NameDescriptionPermissionsReturns
comments

All of the comments that are replies to this.

any valid access_token

array of comment objects

likes

All of the likes on this comment.

any valid access_token

array of objects containing id and name fields of the user who liked the comment.

comments

Read the Using Comments guide to find out more about Creating, Reading and Deleting comments.

likes

Create

You can like a comment by issuing an HTTP POST request to COMMENT_ID/likes with the publish_stream permission. No parameters necessary.

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

Description Type
If the create succeeded. boolean

Delete

You can unlike a comment by issuing an HTTP DELETE request to COMMENT_ID/likes with the publish_stream permission.

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

Description Type
If the unlike succeeded boolean
Updated about 2 months ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy