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

message

Advanced Topics › FQL › message

Information about messages in a thread as represented in FQL.

The Message Graph API object provides similar information.

To access the message table you need

  • read_mailbox permissions

Example

Get a list of threads for a given message_id

SELECT message_id, thread_id FROM message WHERE message_id = <your_message_id> 

Get a list of messages for a given thread id

SELECT message_id FROM message WHERE thread_id = <your_thread_id> 

Get detailed information about a thread

SELECT message_id, thread_id, author_id, body, created_time, attachment, viewer_id FROM message WHERE thread_id = <thread_id>

Columns

IndexableNameTypeDescription
*message_idstring

A unique ID for the message being queried.

*thread_idstring

The ID of the thread the message belongs to.

author_idint

The ID of the user who wrote this message.

bodystring

The content of the message.

created_timeint

The time the message was sent (represented as a unix timestamp)

attachmentarray

An array of information about the attachment to the message. This is the attachment that Facebook returns.

viewer_idstring

The ID of the user whose Inbox you are querying. Defaults to session user.

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