Render fbml app as iframe or vice versa


Suppose you’re using FBML for your canvas page and you think for one page it should be rendered as iframe then you may use fb:iframe in the page. But in facebook there is a better solution. Using fb_force_mode query string parameter you can render your fbml page as iframe or you can render  your iframe base app as fbml at runtime.

Here is an example:

visit this facebook app: . This is a fbml app so look the screenshot


Now if you want to show this page within iframe you can provide fb_force_mode parameter  as iframe like:

Now visit this link and look the screenshot:


The page is now showing within iframe. Similarly if you have iframe base app and for some page you want to show fbml base then you can use


mahmud ahsan

Computer programmer and hobbyist photographer from Bangladesh, lives in Malaysia. My [Business | Twitter | Linkedin | Instagram | Flickr | 500px]

You may also like


  • fabietto
    September 9, 2010 at 12:38 am

    I have a question… If I use fb_force_mode=fbml in a page of my iframe app, can I use ALL FBML tags in this page?

    • mahmud ahsan
      mahmud ahsan
      September 10, 2010 at 3:04 am

      Forget about fbml, facebook will soon close it for canvas application. Develop only fbconnect base or iframe application.

  • zanuka
    October 29, 2010 at 4:53 am

    Ok, so then how can i get my iframe app to grow to the height of my application’s content?

    • mahmud ahsan
      mahmud ahsan
      October 29, 2010 at 6:45 pm

      Forget about fbml in canvas page, iframe base canvas application development is now much easier than ever. Checkout my other tutorials for reference kindly.

  • MK Radio
    February 11, 2011 at 11:03 am

    hi me don’t have this problem with my applis and i’m en iframe non en fbml and don’t possible to open my applis at my website (host) just via facebook and no open frame in new page no possible ! why me have no problem !? i don’t say me is not Mark.Z 😉

  • PonGame
    February 11, 2011 at 11:20 am

    Me too 😉

  • eldy
    March 29, 2011 at 9:15 pm

    It seem can solve the ulgy scrollbar problem.. why you not recommend force mode FBML?

    • mahmud ahsan
      mahmud ahsan
      March 30, 2011 at 12:58 am

      This is my old article based on old facebook system. Skip this article and use iframe in all cases.