Comments

Create, update, delete, and query the Comments for a Target. Comments may also be inserted based on a Target or deleted based on Id.

Table Specific Information

Comments in Facebook are comments about a specific thing. They are always associated with a target, which is the item the comment is directed toward. For example, this could be a post, a picture, or a video. Using this table, you can list the comments for a specific target and also insert new comments about a target.

Select

When querying comments, either the Target or the Id of the comment must be specified. For example, to retrieve all the comments about a specific post, your SELECT statement could look something like this:

SELECT * FROM Comments WHERE Target = '15526475270_410830705612736'

Alternatively, you can specify the Id to retrieve a specific comment. For example:

SELECT * FROM Comments WHERE Id = '15526475270_410830705612736_5193593'

Insert

To insert a comment, you will need to specify a Target and a Message. The target represents the Id of a post, picture, video, or another valid Id for making comments to. For example:

INSERT INTO Comments (Target, Message) VALUES ('PostId', 'This is a sample message.')

Update

Facebook does not allow comments to be modified.

Delete

Comments may be deleted by providing the Id of the comment and issuing a DELETE statement. Please note that Facebook allows only comments created by your app to be deleted using your app.

Columns

Name Type Description
ID [KEY] String The Id of the comment.
Target String The Id of the target you are retrieving comments for. This may be an album, checkin, link, note, photo, post, status update, or video.
FromId String Id of the user who made the comment.
FromName String Name of the user who made the comment.
FromPicture String Picture of the user who made the comment.
Message String The text of the comment.
MessageTags String Aggregate of tags contained in the message.
Likes Integer The number of likes the comment has.
CommentsCount Integer The number of comments in reply to this comment.
LikesData String Aggregate of likes information on the comment.
UserLikes Boolean Boolean indicating if the authenticated user likes the comment.
CanRemove Boolean Boolean indicating if the comment can be removed.
AttachmentType String The type of attachment associated with the comment.
AttachmentUrl String URL of the attachment.
AttachmentTargetId String Id of the target attachment.
AttachmentTargetUrl String URL of the target attachment.
AttachmentMediaImageSrc String The source URL of the image attachment.
CreatedTime Datetime The time the comment was created.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.

Name Type Description
offset String Which result to begin returning results from. Used for manual paging of results.