You are now being logged in using your Facebook credentials
Login With Facebook

Making Facebook Graph API Calls in Joomla

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 = JFBConnectFacebookLibrary::getInstance();

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.

More functionality

There's a ton that can be done with JFBConnect and the Facebook API. Should you need more advice or assistance, check out all of the JFBConnect Developer Documentation or let us know in our support area!

Add the power of Facebook to your Joomla site today!

Subscriptions to JFBConnect entitle you to unlimited support, usage on multiple domains, and access to all new Joomla 1.5, Joomla 1.6, Joomla 1.7 and Joomla 2.5 releases for the duration. Subscriptions are non-recurring and you are free to continue using JFBConnect after your subscription expires!

megaphoneStay up to date with new releases and features. Join our newsletter: