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

thread

Advanced Topics › FQL › thread

Information about message threads in a user's inbox as represented in FQL.

The Thread Graph API object provides similar information.

To access the thread table you need

  • an access token with extended read_mailbox permissions

Examples

Get all threads in a user's inbox. (Try this query)

SELECT thread_id, subject, recipients FROM thread WHERE folder_id = 0 

Get all unread threads in a user's inbox. (Try this query)

SELECT thread_id, subject, recipients FROM thread WHERE folder_id = 0 and unread != 0

Columns

IndexableNameTypeDescription
*thread_idstring

The ID of the thread being queried.

*folder_idstring

The ID of the folder that belongs to the thread you are querying. The ID can be one of: 0 (for Inbox), 1 (for Outbox), or 4 (for Updates).

subjectstring

The subject of the thread.

recipientsarray

The user IDs of the recipients of the thread.

updated_timeint

The created_time of the most recent message in the thread.

parent_message_idstring

The ID of the message from which this thread was branched, or 0 if this thread is not a branch. The parent_message_id is a concatenation of the thread ID and the message ID, joined by an underscore.

parent_thread_idint

The ID of the thread from which this thread was branched, or 0 if this thread is not a branch.

message_countint

The number of messages in this thread.

snippetstring

A short bit of text from the most recent message.

snippet_authorint

The user ID of the author of the snippet.

object_idint

The object that sent this message, or 0 if it was not sent by an object. You can get more information about this object in the profile table.

unreadint

The number of unread messages in the thread.

viewer_idstring

The ID of the user whose Inbox you are querying.

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