The Facebook Graph API lets you make many calls for getting information about user's on your site. JFBConnect wraps this API into our own library, which makes it use more Joomla functionality and more easily report errors using the Joomla error messages. Below is some information and examples on how to perform your own custom API calls to the Graph API.

Note: While developing, we recommend enabling the "Display API Errors On Front-End:" setting in the Facebook API configuration area of JFBConnect. This will help diagnose any syntax or call errors you may make while developing. When done with developing, disable the setting.

Getting the JFBConnect Library

To get access to the JFBConnect library, use the following code:

$jfbcLibrary = JFBCFactory::provider('facebook');

Making Facebook Graph API Calls

Once you have the library instance, you can make calls to the full Graph API library using the ->api() function. For all available calls, see the full Facebook Graph API documentation.

Some example calls:

Fetch the current wall feed

$feed = $jfbcLibrary->api('/me/feed');

Fetch the current user's Likes

$likes = $jfbcLibrary->api('/me/likes');

In each case above, you'll be returned an array with a lot of data. You'll need to parse through this however you need.