Facebook Query Language
Facebook Query Language (FQL) is a query language that allows querying Facebook user data by using a SQL-style interface and without using the API.[1]
The beauty in FQL is the ability to query any Facebook data just as you would from a SQL database. In the following query, we pull four different types of data from a single table (status) where the user is me. When trying to do this yourself, you need to log into Facebook from your application and you also probably need to grant access to whatever data you want to pull. Due to the growing number of privacy concerns for social networks, most people have disabled most data to be shown to anyone and your application will therefore not be able to see it. However, once you login and grant access, you can see all data that you grant access to.
SELECT status_id,message,time,source FROM `status` WHERE uid = me()
Note: Wikipedia's source tag doesn't understand FQL as a language, so I listed SQL instead. They are probably similar enough. It's just in how the code is displayed in the article.
Once you've returned data from an FQL query, you should find it in JSON format by default. With JSON, you can just break it up and manipulate it on your page.
To look into other stuff with FQL, just log in to the Developer section of Facebook and review the documentation. Each table (different type of data) has all the different column names and interactions listed.
References
- ^ "Facebook Query Language (FQL)". Documentation. Facebook. Retrieved 2010-12-16.