i am trying to add this script to my iframe app on facebook but it seems not to work:
$signed_request = $facebook->getSignedRequest();
$like_status =
$_REQUEST['signed_request']
could be empty if your canvas (or page tab) URL is not the final one and redirects to some other URL because Facebook posts the signed request only once. When redirecting, the posted value is lost.
If you have some control over the redirection, then add ?signed_request=$_REQUEST['signed_request']
to your redirected URL (you might also need to pass other custom GET parameters)