Here is how you can tell if a user likes your app no matter which Javascript API your Facebook application uses.
UPDATE: Using PHP
Put the following in a *.php file hosted on your server and then create a Facebook Tab application pointing to your server’s php file. You will be able to tell if a Facebook user liked your tab with the following.
<?php
$signed_request = $_REQUEST["signed_request"];
list($encoded_sig, $payload) = explode('.', $signed_request, 2);
$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
if (empty($data["page"]["liked"])):?>
<p>The viewer has not clicked like for your page.</p>
<?php else: ?>
<p>The viewer liked your page.</p>
<?php endif; ?>
(Current) JavaScript SDK
I was able to find more documentation on the current JS API so I could tell if a user was a fan when the page loads and as they click to “like” or “unlike”.



Recently I had a conversation with a few members of my team about Flash and we all agreed that there are a thousands of ways to do something in Flash and only a few to do it right. Unplanned and poorly organized Flash projects can dampen productivity and really make life difficult for the developer that inherits the code after you write it. Below is an introduction to best practices when developing Flash. It will make your life easier and your Flash developer friendships last longer.