Time for action – rendering Lists of Posts
Since a Graph List's data
property is an array of Graph Objects, we could just loop through the array and create a new Graph Object Renderer for each element. Feel free to have a go at this, if you like, but I've got another solution.
I've created a second renderer: this time, a Graph List Renderer. I've also created a class graph.GraphList
. And
CustomGraphContainerController
inherits a method called renderGraphList()
. Perhaps unsurprisingly, this takes an object of type graph.GraphList
as a parameter, and creates a new Graph List Renderer to display its contents. So, we need to take a Graph List that we receive from the Graph API, and turn it into an instance of the GraphList
class. The GraphList
class ...
Get Facebook Graph API Development with Flash now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.