Here is the example:
These guys get people to click on Like button (in Step 1) first bef
Actually information if user is page fan or not exists in signed request. Since you need firstly to decode signed request like it is here:
$signed_request = $_REQUEST["signed_request"];
list($encoded_sig, $payload) = explode('.', $signed_request, 2);
$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
And after that access page liked variable:
$pageLiked = $data['page']['liked'];
Now FB is on the way of deprecating FBML so don't consider
as something that will work for a long base.