Is there a way to determine if a Facebook user likes some page with the proposed Facebook APIs?
UPDATE
I have been trying to get this to work through the PHP graphics API for a while 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 zero, although I logged in.
Apparently, the above code is only good for Facebook Connect “Canvas” applications, I call this code from the FBML tab on the Facebook page page via an AJAX call to my server.
I am not very familiar with all the terminology of Facebook development.
How can I make the current user like me in my situation?