Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Using the PHP SDK gives you the benefit of being able to access the Open Graph with a special language called FQL. FQL stands for Facebook Query Language. And if you're used to SQL, then FQL will be very similar to you, so most PHP developers should be able to pick it up quickly. The language has some features not in the Graph API, like the ability to batch multiple queries in a single call. Unlike SQL, the FROM clause can only contain a single table, that means you can't do joints with this language.
However, the IN keyword can do sub queries, but only within its own scope. Queries must be indexable, which means that you can only perform queries that include WHERE on fields that are indexable. So you can't, for example, say, give me the user ID of every user in Facebook. You have to qualify that by saying that you want users who are also your friends. You can check the documentation to see which fields need to be used in the WHERE clause. Let's look at the tables on the left of the documentation and click on any one of these tables, and the fields that are indexable will be marked right here.
So you need at least one of those in your WHERE clause. You can use ORDER BY and LIMIT clauses. Just remember that this is not full SQL so there's always limits to what FQL can do. Also the data is returned in the JSON format, so we have to parse that using the file_get_Contents method to read the queries and then feed those results into the JSON-encoded method. That will give us an associative array that we can work from. So although you might be disappointed that FQL is not as powerful as SQL, it does give you another great tool to dig into the user data available through the Open Graph.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98207 Viewers
61 Video lessons · 85506 Viewers
71 Video lessons · 69469 Viewers
56 Video lessons · 101807 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.