Together with Ruud i made a nice functionality for website baker. On a facebook page you have the possibility to add pages and apps.
When you use a news page (news module, topics) on your website or like my example the catalist module. you have the possibility to add this page in a iframe on your Facebook page:
step 1: go to your Facebook page
step 2: in the search box you search on 'Static HTML: iframe tabs'
step 3: add the application
step 4: change core WB
In the /index.php (root index)
Between $wb->page_select() and $wb->get_page_details(); you copy/paste the code down here:
// Sticky Template switcher
// get the template to display from URL
if (isset($_GET['template'])) {
if(file_exists(WB_PATH.'/templates/'.$_GET['template'].'/index.php')) {
define('TEMPLATE',$_GET['template']);
$_SESSION['TEMPLATE']=TEMPLATE;
}
} else { // get the template to display from Session Variable
if(isset($_SESSION['TEMPLATE']) AND $_SESSION['TEMPLATE'] != '')
define('TEMPLATE',$_SESSION['TEMPLATE']);
}
step 5: go back to your Facebook page
step 6: go to the app and make a iframe of your site
<IFRAME SRC="
http://yoursite.com/pages/cars.php?template=FB" WIDTH=480 HEIGHT=1600> </IFRAME>
step 7: with the code of step 4 you have the possibility to change the template. Add ' ?template=yourtemplate' behind the URL en switch from template.
step 8: So make a template for Facebook
step 9: add the iframe code to the Facebook app and done!
step 10: to change the page name go to settings and then to apps and modify the page name
I add a example picture down here from a client.
The nice thing is you use a iframe so you don't have to make double content when your website is up to date your Facebook page is also up to date. Let me know if you find this tutorial usefull.
