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; ?>
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”.