A lot of developers and admins Facebook pages don’t know that they can detect whether the visiting user is already a fan of the page or not.
When the user visit your Page Tab, Facebook will send you the usual signed_request but with additional parameter called page.
When a user navigates to the Facebook Page, they will see your Page Tab added in the next available tab position. Broadly, a Page Tab is loaded in exactly the same way as a Canvas Page. When a user selects your Page Tab, you will received the signed_request parameter with one additional parameter, page. This parameter contains a JSON object with an id (the page id of the current page), admin (if the user is a admin of the page), and liked (if the user has liked the page). As with a Canvas Page, you will not receive all the user information accessible to your app in the signed_request until the user authorizes your app.
"You are not a fan!"
"Welcome back fan!"