Is there any way to determine if a Facebook user 'likes' a certain page with the API Facebook offers currently?
UPDATE
I have been trying to get this to work via the PHP graph API for a while now with this code.
$fbconfig['appid'] = '***';
$fbconfig['api'] = '***';
$fbconfig['secret'] = '***';
try {
include_once "facebook.php";
} catch(Exception $o) {
echo '<pre>';
print_r($o);
echo '</pre>';
}
$facebook = new Facebook(array(
'appId' => $fbconfig['appid'],
'secret' => $fbconfig['secret'],
'cookie' => true,
));
$session = $facebook->getSession();
$me = null;
if ($session) {
try {
$uid = $facebook->getUser();
$me = $facebook->api('/me');
} catch (FacebookApiException $e) {
d($e);
}
}
if($me) {
try {
$likes = $facebook->api('/me/likes');
} catch(Exception $o) {
d($o);
}
}
However, the session is always null, even though I am logged in.
Apparently, the above code is only good for Facebook Connect "Canvas" applications, I am calling this code from an FBML tab on a Facebook "Page" through an AJAX call to my server.
I'm not very familiar with all of the Facebook development terminology.
How can I get the current user's 'likes' in my situation?