As of October you will need an SSL certificate to support a https version of any app you create – this is a requirement from Facebook. Please be aware of this when purchasing More information
Facebook have recently allowed iFrame applications to be used on Business/Fan pages . This opens up more information for developers and page owners.
In the old days any content that you only wanted to be visible to users who ‘liked’ your page could still view the source of a page and get access to the hidden content, iFrame apps remove this loophole and this helper class allows you to easily test if a user likes your page or is an admin of the page in question. This app allows you to detect fans and also allows you to customise apps to a number of pages, hide content from users who don’t like your page (and make it easier to offer incentives to those that do) and to offer customisation/enhanced options to page admins
I’ve also included the code to check if a user has authorised the application so that apps can be further customised to individual users using the open graph.
Please note, that to get the Live preview to work correctly you need to view it in it’s own window. Facebook doesn’t seem to like being in a Frame
This file requires that your server can use file_get_contents and json functions available in PHP