Sometime in Facebook Pages, you can see the message / banner, we have offers for you, like us to see. Or Like us to unlock the content etc. These all are for getting more likes in their Facebook page and indeed, it is a very nice idea to spread your updates among many of your Facebook Fans. Usually people won’t do the dislike option to revert it back!

The question is how can we do this ?

The trick here is, you need to create a page using iframe as you usually create FB app. In that iframe, you have your custom page fragment hosted somewhere else showing some copies/contents/offer etc.

Each time when Facebook load your url inside the iframe, Facebook do a POST to your domain signed_request as the parameter. The rest of the part you have to handle with your server side scripting.

Here mine is PHP: