In My Component, When I wanted to check if the user is Logged into FB I used to add
$jfbcLibraryFile = JPATH_ROOT.DS.'components'.DS.'com_jfbconnect'.DS.'libraries'.DS.'facebook.php';
if (!JFile::exists($jfbcLibraryFile)) {
echo "JFBConnect not found. Please reinstall.";
return;
}
require_once ($jfbcLibraryFile);
and then add :
$fbClient = JFBConnectFacebookLibrary::getInstance();
$fbUserId = $fbClient->getFbUserId();
To get the logged in user id.
I see there is
// Deprecated file. Shouldn't need to require/include this file, but if you are, please load
require_once(JPATH_SITE . '/components/com_jfbconnect/libraries/provider/facebook.php');
And in the fb provider there is
function getFbClient()
{
JLog::add("JFBConnectFacebookLibrary getFbClient is deprecated. Use JFBCFactory::provider('facebook')->client", JLog::WARNING, 'deprecated');
return $this->client;
}
How would I go about initializing Fb to get the logged in FB user id in my component.