Using this code:
try
{
$facebook->api('/me/feed', 'POST',
array(
'link' => 'http://apps.facebook.com/carlosnewtest',
'message' => $_SESSION['current_user']['name']." ha comenzado a jugar Snow Punch!!",
));
}catch (FacebookApiException $e)
{
$e_type = $e->getType();
echo '<script>alert("SESSION "+'.$e_type.');</script>';
$loginUrl = $facebook->getLoginUrl($permission);
echo("<script> top.location.href='".$loginUrl ."'</script>");
}
…always throws an exception.
Try switching
carlosnewtestwith the numericAPP_IDprovided by Facebook.Also, the Exception message is empty because
you are never throwing it a messageFacebook is not throwing a message [hat tip @Chris] When usingtry/catchblocks, using throw to specify what’s put into your Exception message is very useful for debugging.