Friend request (FQL)

From Facebook Developer Wiki

Revision as of 23:45, 11 November 2008 by Mike Vernal (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search


Contents

Description

The FQL friend_request table. Query this table either to determine which users have sent friend requests to the logged-in user or to query whether a friend request has been sent from the logged-in user to a specific user. You can run this query only when the uid_to is set to the logged-in user or when uid_from is set to the logged-in user and uid_to is set to a specific user.

To structure your query, use the table name (friend_request 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 the uid_to column.

Columns

IndexableNameTypeDescription
uid_from int The user ID of the user making the friend request.
* uid_to int The user ID of the user receiving the friend request (which must be the logged-in user if uid_from is not the logged-in user).

Examples

SELECT uid_from FROM friend_request WHERE uid_to=204686


SELECT uid_to FROM friend_request WHERE uid_from=9074 AND uid_to=4

See Also

reference