How to create an iframe tab for your Facebook Page with content from WordPress
By ilokano
Perhaps you have seen great looking Facebook pages like that of Coca-Cola, and want to have the same customized page for your own business.
It was fairly easy to do something similar using Facebook static fbml apps and a smattering of html knowledge (or with the help of html editors). But recently, Facebook announced that they are discontinuing support for static fbml and developers are instructed to use iframe tabs instead. By March 11, 2011 you will no longer be able to add static fbml apps to your Facebook pages.
So what are you to do?
Well, the quickest way is to head on to online services that offer custom Facebook Pages for a monthly subscription fee, or hire a web developer-- ehem! :-) --to do the dirty work. But if you want to save precious dollars, you don't really need all the features in paid Facebook apps maker, AND you're smart enough to follow simple step-by-step instructions, let me show you how to make a custom Facebook page using iframe tabs, with content that you can easily add/edit/update using WordPress.
Now obviously, there are a few requirements for this to work:
- You must already have your own WordPress site and know how to create posts and pages in WordPress.
- You know how to upload a new page template to the server hosting your WordPress site.
- You know how to create images using Photoshop or any image editing software.
Part 1 - Create the WordPress page
- The content area in a Facebook page is limited to a 520px width. The first step, therefore, is to create a WordPress page template that fits inside a 520px wide content area. If you don't know how to create a template, you can download the basic template I used for this tutorial from this link.
- Upload the template I created (page-iframe.php) to your WordPress theme folder. In WordPress admin, it will show up in your template options as "FB iFrame".
- Create the page that will go into the Facebook iframe. Here are a two things to remember when creating your page:
- Images must fit inside 520px width.
- Links must open in a new window (target="_blank") or reload the entire page (target="_top"), otherwise your links will load inside the Facebook frame.
- In my example, I created an image 520px wide and 600px high using Photoshop, uploaded the image to my WordPress site (using Wordpress' media uploader) then embedded it on the page thru the page editor.
- Publish your page, view your new page in a browser and copy the url of your page.
Image for Part 1 - Step 5
Part 2 - Create a Facebook Page
- Login to your Facebook account then go to http://www.facebook.com/pages/create.php
- Select the type of Page you want to create and fill in the required information.
- Edit you Page settings if you like by adding profile picture, company information, etc.
Image for Part 2 - Step 2
Part 3 - Create the Facebook iframe tab
- Log in to your Facebook account, then head on to http://developers.facebook.com/.
- If this is your first time to access the developers page, Facebook will ask you to allow access to your account information.
- Click on "My Apps".
- Click on "Set Up New App".
- Fill in "App Name" and Agree to terms.
- Answer the captcha security check.
- Your app is created and you are taken to the app settings page. The important section is "Facebook Integration" shown below.
- Fill in the following information:
- Under "Canvas Page" place a base url for you app, in my example "custombizapp".
- Under "Canvas URL" place the url of you website, in my example "http://www.yoursite.com/". Don't forget the trailing slash.
- Under "Tab Name" put a label that will appear on you Facebook Page menu. In my example "Welcome".
- Now refer to the url of the page you published in WordPress (Part 1 - step 5) and take the subdirectory name. In my example, the subdirectory is underlined in red. Enter the subdirectory name under "Tab URL".
- Save your settings and your new app is added to the "My Apps" list.
- Now click on "Application Profile Page".
- Click on "Add to My Page" and from the list of pages that pops up, select the page you created in Part 2.
- Browse to your Facebook Page and you will see the custom app "Welcome" added to your Page navigation. Click on the link and you should see the page you created in WordPress inside you Facebook Page.
- If you want Facebook users to go directly to your welcome app when visiting your page, edit your Page settings by clicking on "Edit info", select "Manage Permissions" and under "Default Landing Tab" select your welcome app.
Image for Part 3 - Step 8
Image for Part 3 - Step 10
Image for Part 3 - Step 11
Image for Part 3 - Step 13
Why this is cool
Here is a demo of a Facebook page I created with content from WordPress.
You can easily update your Facebook Page from WordPress. If you are not an expert with html, the WordPress editor will take care of creating the html page for you. Wordpress plugins (but most likely not all plugins) will work inside your Facebook page so you can add more cool stuff to your page, like in my example, I used Post Tabs, Google Fonts and NextGen Gallery plugins. I have not tested this but I would think other plugins like shopping carts would also work so now you can extend your online store from your site into Facebook.
About me
I'm a freelance website designer from the Philippines. Visit my portfolio site and learn more about my design services.
Comments
Great article. thank you for writing this up.
Great article. Thanks so much for your help!!! Greetings from Puerto Rico!
Hi,
I've used the template you used, works just fine except for one issue:
The iframe canvas isn't showing on iphone when vieweing facebook as "full site".
Any ideas?
@tal_rozow Sorry, but I have not tested in iPhone. Will try to check when not busy. Thanks.
Ok thanks I'll keep following - great tutorial btw.
My question is, how did you get the image to change once I clicked the like button on the demo page?
Hi BanditSiix. That feature on the demo facebook page was added days after I wrote my tutorial. Adding a "fan-gate" in iframe really deserves an entire hubpage of its own but here's one I found:
http://www.chilipepperdesign.com/2011/02/15/reveal
You need to get the php sdk and upload to your wordpress site for it to work:
Hi Jasper!
Thank you so much for this Hub! It is so helpful indeed.
I just have one problem, the app I created is not showing up as the default landing page of the Fan Page. I think I followed your instructions to the tee (Part 3 #13), but when I search for the page using a different FB account (an account that is not an administrator of the said page), the link directs me to the wall of the Fan Page and not the app I have just created.
Thank you so much in advance for the kind help you can please throw my way:-)
Donna
Hi Donna. That's strange. Are you sure you were not logged in as admin, coz that would have directed you to the wall. Have you checked that "Default Landing Tab" goes to your custom iframe app? Could you show us the FB page?
Hey Jasper,
Thank you so much for the quick reply!
I used another account and searched for it. I noticed though that I get directed to the wall if I have already "liked" the page. But once I "unlike" it and search for it again, I get directed to the default landing page.
Is there any way to keep the default landing page for all visitors, including those who have already liked the page?
BTW, here's the link
http://www.facebook.com/pages/Chiropractors-in-Kno
Thank you, you're an angel :-)
Aren't you supposed to be sleeping now? It's late! :-)
Donna
Hey Jasper. Can you tell me how you did the menu on the demo page? I made a picture and now im lost making a similar menu like yours. Any help would be much appreciated
Really nice and detailed info. Thanks.
Hi Jasper. Awesome post. Thanks. I would like to follow it and create a wordpress page on fb that I could update from within the wordpress dashboard.
Could I achieve that by designating a page within my regular wordpress website (using a theme of a regular size) and apply the "facebook sized" theme to that page only?
I need to make sure that particular page does not get indexed anywhere else but facebook.
I would really appreciate your advice here,
All the best,
Filip
KimJinSun 14 months ago
Wow Good Information thanks....