I'm trying to create a so-called "Welcome Tab" app for a business page. What I want to happen is that either my canvas app displays a message when a vistor hasn't Liked the page, or the normal "Wall" tab when they have.
I've done this by setting my canvas page as the default landing tab and then checking the 'liked' parameter passed by Facebook and my PHP can successfully deterime what it should be doing. As per this extract:
if ($results['page']['liked'] == 1) {
$redirect = $pages[$results['page']['id']]['liked']; } else {
$redirect = $pages[$results['page']['id']]['unliked']; }
header('Location: '.$baseurl.$redirect);
However using header() to load a page which in turn contains a little bit of Javascript to do a "top.location = http://www.facebook.com/pages/xxxxxxx/yyyyyyy?sk=wall" redirection takes a second or so and results in the visitor seeing a blank canvas page briefly and then a full page reload.
However this page https://www.facebook.com/ourcarnoustie seems to be able to instantly display the Wall to Likers, and its own "Welcome" tab to non-Likers without any apparent delay or refresh.
Any suggestions or pointers would be greatly appreciated. Thanks.
Facebook defaults to the wall for people who've liked the page. In fact it's usually the reverse that's requested on how to set the welcome page for everyone :)
For what you're asking you shouldn't need to do anything as that's the behavior.