Render fbml app as iframe or vice versa


facebook

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: http://apps.facebook.com/flixster/home . This is a fbml app so look the screenshot

fb_force_mode

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

http://apps.facebook.com/flixster/home?fb_force_mode=iframe

Now visit this link  http://apps.facebook.com/flixster/home?fb_force_mode=iframe and look the screenshot:

fb_force_mode=iframe

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

http://apps.facebook.com/yourapp?fb_force_mode=fbml

🙂

mahmud ahsan

Love computer programming and write occasional blog post. In my early career I worked mostly on web based application and since 2011, I exclusively working on iPhone and android applications. I work at home, father of a nice kid and husband of a beautiful wife. [My Business | Twitter | Linkedin]

You may also like

8 Comments

  • 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.

Comments are closed here.

About Me

Hi I am Mahmud Ahsan. I Love computer programming and write occasional blog post. In my early career I worked mostly on web based application and since 2011, I exclusively working on iPhone and android applications. I work at home, father of a nice kid and husband of a beautiful wife. [My Business | Twitter | Linkedin]

Twitter Feed

Fanpage