Message (FQL)
From Facebook Developer Wiki
Contents |
Description
The message FQL table. Query this table to return information about messages in a thread. The user needs to grant the calling application the read_mailbox extended permission.
To structure your query, use the table name (message in this case) in the FROM clause. The items in the Name column correspond to columns in the table that can be referenced in the SELECT and WHERE clauses.
In order to make your query indexable, the WHERE in your query should contain an = or IN clause for one of the columns marked with a * in the Indexable column of the table.
Columns
| Indexable | Name | Type | Description | |
| * | message_id | string | A unique ID for the message being queried. | |
|---|---|---|---|---|
| * | thread_id | int | The ID of the thread the message belongs to. | |
| author_id | int | The ID of the user who wrote this message. | ||
| body | string | The content of the message. | ||
| created_time | int | The time the message was sent. | ||
| attachment | array | An array of information about the attachment to the message. This is the attachment that Facebook returns. | ||
| viewer_id | int | The ID of the user whose Inbox you are querying. Defaults to session user. |
Examples
Get all messages in a thread.
SELECT ... FROM message WHERE thread_id = ...
Notes
- To get started, as a developer you can access the Inbox APIs via the
read_mailboxpermission in order to develop and test your application. To launch your application to all users, please apply to the Inbox API whitelist here.
