Reference articles on history, science, culture and more
Encyclopedia

Facebook Query Language

Query language

Facebook Query Language (FQL) is a query language that allows querying Facebook user data by using a SQL-style interface, avoiding the need to use the Facebook Platform Graph API. Data returned from an FQL query is in JSON format by default.

01History

FQL was first made publicly available in February 2007. FQL was no longer available as of August 7, 2016, when Facebook API 2.0 was no longer available. Facebook API versions newer than API 2.0 do not support FQL.

02Example

In the following query, four different types of data are retrieved from a single table (status) and for a single user ("me"):

SELECT status_id,message,time,source FROM `status` WHERE uid = me()

This query can run by querying the Facebook graph endpoint /fql with the parameters set to q=[FQL]

Watch videos about Facebook Query LanguageExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article Facebook Query Language, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.