Graph:Thread

From Facebook Developer Wiki (FbDevWiki.com)
Jump to: navigation, search

A message thread in the new Facebook messaging system. Every thread has a thread ID that represents an object in the Graph. To get access to read a user's threads, you should request the read_mailbox Extended Permission. This is a read only API.

You can GET individual message threads by specifying the thread ID:

GET https://graph.facebook.com/[thread_id]

Or you can GET all the threads in a user's inbox:

GET https://graph.facebook.com/[user_id]/threads

You can also filter or query threads by tag or query terms:

GET https://graph.facebook.com/[user_id]/threads?q=hello
GET https://graph.facebook.com/[user_id]/threads?q=hello&tags=other

For a full list of tags, please see the unified_thread FQL table.

Properties

Name Description Permissions Returns Condition
id The unique ID for this message thread read_mailbox JSON string
snippet Fragment of the thread for use in thread lists read_mailbox JSON string
updated_time Timestamp of when the thread was last updated read_mailbox JSON string containing a IETF RFC 3339 datetime
message_count Number of messages in the thread read_mailbox integer
unread_count Number of unread messages in the thread read_mailbox integer
tags Thread tags read_mailbox list of JSON strings

Connections

Name Description Permissions Returns
participants A list of the thread participants read_mailbox Contains in data a list of JSON objects each of which have name, email, and Facebook id (if available) as fields
former_participants A list of former thread participants who have unsubscribed from the thread read_mailbox Contains in data a list of JSON objects each of which have name, email, and Facebook id (if available) as fields
senders A list of participants who have sent a message in the thread read_mailbox Contains in data a list of JSON objects each of which have name, email, and Facebook id (if available) as fields
messages A list of the message objects contained in this thread read_mailbox A list of message objects
Personal tools
Namespaces
Variants
Actions
Navigation
Graph API
FQL
Toolbox