Within a page tab app, you get the info whether the viewing user liked the page already or not in the signed_request
. (Since it is POSTed to your app on initial load into the iframe, you can only access it server-side.)
For how to parse it, see here: https://developers.facebook.com/docs/facebook-login/using-login-with-games#parsingsr (If you are using the PHP SDK, that has a method to get it parsed implemented already.)