Facebook Iframe Application: Resize Iframe

If you are using Rails and Facebooker, and you have a resizable Iframe application and you are having problems with resizing, do the following:

a) Make sure that the Iframe is set to Resizable in the Facebook appplication settings.

b) Instead of calling just <%= init_fb_connect "XFBML" %> (as mentioned in all the tutorials), use

<% init_fb_connect "XFBML" do %>
FB.CanvasClient.startTimerToSizeToContent();
<% end %>

This should automatically resize your Iframe in the facebook canvas

Bookmark and Share

Leave a Comment