Mailbox folder (FQL)

From Facebook Developer Wiki

Jump to: navigation, search


Contents

Description

The mailbox_folder FQL table. Query this table to return information about a user's Inbox folders. The user needs to grant the calling application the read_mailbox extended permission.

To structure your query, use the table name (mailbox_folder 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. If you want to retrieve all of a users folders, you can simply do: SELECT folder_id, name, unread_count FROM mailbox_folder WHERE 1

Columns

IndexableNameTypeDescription
* folder_id int The ID of the folder being queried. The ID can be one of: 0 (for Inbox), 1 (for Outbox), or 4 (for Updates).
* viewer_id int The ID of the user whose Inbox you are querying.
name string A short description of the folder being queried.
unread_count int The number of unread threads in the folder being queried.

Examples

Get all information about all of a user's folders.

SELECT folder_id, name, unread_count FROM mailbox_folder WHERE 1

Notes

  • Currently, all users only have three Inbox folders: Inbox (folder_id = 0), Outbox (folder_id = 1), and Updates (folder_id = 4)
  • To get started, as a developer you can access the Inbox APIs via the read_mailbox permission in order to develop and test your application. To launch your application to all users, please apply to the Inbox API whitelist here.

See Also

reference