Facebook provides FBML that allows you to serve content to fans by using fb:visible-to-connection
The issue with this solution is that there is no solid way of serving content to non fans. If you have noticed around facebook more and more Pages are serving content specifically asking fans to fan the page before retrieving the content. Like these following examples:
Chase – note how there are multiple locations that become activated after liking
This has existed for a while now and currently it is about to becoming deprecated by facebook. Facebook understands the importance of this so it seems that even though new functionality is disabling its function, facebook will work to keep this feature:
This will return a true or false depending on the current viewers fan status. The only problem with this solution is that it will not work with OAuth enabled. You must go into your application’s Advanced settings and disable it.