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()
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.
References
- ^ "Facebook Query Language (FQL)". Documentation. Facebook. Retrieved 2010-12-16.