I am having a confusing issue, I have a fanpage app/tab , and I want to know if the user liked it...usually this used to work , this is the code and i'm puzzled, if anyone can guide me on this please:
$user = $facebook->getUser();
$signedRequest = $facebook->getSignedRequest();
if (!$user) {
echo "Please <a target='_blank' href='".$login_url."'>click here</a> to login to the game first!";
//echo "<a target='_blank' href='$login_url'><IMG SRC='images/likeus.jpg' border=0 width='100%' /></a>";
die();
}
try {
$likes = $facebook->api("/me/likes/316624641780313");
}
catch (FacebookApiException $e) {
echo 'Please <a target="_blank" href="' . $login_url . '">click here</a> to login to the game.';
error_log($e->getType());
error_log($e->getMessage());
}