Time for action – displaying a Graph Object's connections

The Graph Object Renderer has the ability to show a list of all the object's connections, if that list is included as part of the Graph Object.

All we have to do is tell the Graph API to give us that list when we request a Graph Object; since our code for creating an instance of GraphObject from a JSON copies all the properties of that JSON to the GraphObject, this metadata will be included too. So, actually, all we need to do is add the metadata=1 flag to the end of the Graph URL that we request, and it'll do the rest for us.

We could do this by changing our request code as shown in the following excerpt:

public function CustomGraphContainerController(a_graphControlContainer:GraphControlContainer) ...

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.