Facebook Developers
DocumentationSupportBlogAppsLog In
  • Getting Started
  • Core Concepts
  • Advanced Topics
    • Dialogs
    • FQL
    • Internationalization
    • Ads API
    • Credits
    • Chat API
    • Legacy REST API
    • Legacy FBML
    • Legacy FBJS
    • Legacy Javascript SDK
  • SDK Reference
  • Tools
  • Tables
    • album
    • application
    • apprequest
    • checkin
    • comment
    • comments_info
    • connection
    • cookies
    • developer
    • domain
    • domain_admin
    • event
    • event_member
    • family
    • friend
    • friend_request
    • friendlist
    • friendlist_member
    • group
    • group_member
    • insights
    • like
    • link
    • link_stat
    • location_post
    • mailbox_folder
    • message
    • note
    • notification
    • object_url
    • offer
    • page
    • page_admin
    • page_blocked_user
    • page_fan
    • page_milestone
    • permissions
    • permissions_info
    • photo
    • photo_src
    • photo_tag
    • place
    • privacy
    • privacy_setting
    • profile
    • profile_view
    • question
    • question_option
    • question_option_votes
    • review
    • standard_friend_info
    • standard_user_info
    • status
    • stream
    • stream_filter
    • stream_tag
    • subscription
    • thread
    • translation
    • unified_message
    • unified_thread
    • unified_thread_action
    • unified_thread_count
    • url_like
    • user
    • video
    • video_tag

comment

Advanced Topics › FQL › comment

Comments associated with one or more fb:comments as represented in FQL.

To read the comment table you need

  • no access_token for public data
  • any valid access_token to access private field: user_likes

Example

Comments from the comments plugin on this page: (Try this query)

SELECT post_fbid, fromid, object_id, text, time \
FROM comment \
WHERE object_id IN \
  (SELECT comments_fbid \
   FROM link_stat \
   WHERE url ='http://developers.facebook.com/docs/reference/fql/comment/')

All the replies for each comment from the comments plugin on this page: (Try this query)

SELECT comments \
FROM comment \
WHERE object_id IN \
  (SELECT comments_fbid \
   FROM link_stat \
   WHERE url ='http://developers.facebook.com/docs/reference/fql/comment/')

Columns

IndexableNameTypeDescription
*xidstring

The external ID of the fb:comments being queried. You can specify more than one XID.

*object_idstring

The object_id of an object on Facebook. This can be a video, note, link, photo, or photo album. Note that for photos and albums, the object_id must be queried from the photo and album FQL tables. Note that in the photo and album tables, object_id is a different field from pid and aid. You must specify either an xid or an object_id.

*post_idstring

The ID of the post in the stream.

fromidint

The user submitting a comment.

timeint

A Unix timestamp associated with the creation time of a comment.

textstring

The text of a comment.

idint

A unique ID for a given XID for each comment.

username string

The user name that a user entered when they posted a comment. In these cases, the fromid returned will be 0. Note that user names for valid users are not returned here.

reply_xidstring

The target XID for Feed stories generated by the user; applications can retrieve comments made to that story by calling this XID.

post_fbidstring

The object_id of this comment. This can be used for querying likes for this comment or replies to this comment if the comment came from the comments plugin.

app_idint

The application id associated with this comment.

likesint

The number of likes for this comment.

commentscomments

The replies to this comment.

can_likeboolean

If the current user is able to like this comment.

user_likesboolean

If the current user liked this comment.

text_tagsarray

Array of mention objects for each object tagged in the comment.

is_privateboolean

If this comment is private.

Updated about 2 months ago
Facebook © 2012 · English (US)
AboutCareersPlatform PoliciesPrivacy Policy