In this recipe, we're going to load the comments for a given item on Facebook and display them using a Flex framework List component, using a further Item Renderer component to format the output, so that each comment looks more like this:
And less like this, which is what would happen without a custom Item Renderer:
Comments can be added to almost every Facebook object type, but for the purposes of this recipe, we're going to display the comments for a publicly-available photo object.
Because this photo is publicly available and because the comments attached to a Graph API object inherit their permissions from the object itself, there's no requirement for the user to be authenticated with Facebook in order to load the image data or the comments associated with it.
The object ID of the photo in question is 200843466599829
. When loaded, this object should look like this: