How to check Facebook Application is Alive or Dead?

<?php
include("facebook.php");
$APPLICATION_ID = "";
$APPLICATION_SECRET = "";
$facebook = new Facebook(array(
'appId'  => $APPLICATION_ID,
'secret' => $APPLICATION_SECRET,
'cookie' => true
));
$fql    =   "SELECT api_key FROM application WHERE app_id=" . $APPLICATION_ID;
$param  =   array(
 'method'    => 'fql.query',
 'query'     => $fql,
 'callback'  => ''
);
$fqlResult   =   $facebook->api($param);
if(isset($fqlResult[0]['api_key']) && $fqlResult[0]['api_key']!="")
  echo "This app is Alive!";
else
  echo "This app is Dead!";
?>