Full height of Facebook app Canvas in iframe

Hafiz picture Hafiz · Feb 27, 2011 · Viewed 20.2k times · Source

I am having problem that I am developing a facebook app using iframe, the problem that is coming is that my full content is not being displayed . When I inspect it through firebug then I came to know that iframe is having height: 800px so I want to increase it or set height dynamically. I have tried FB.Canvas.setSize() but it didn't work so what should I do?

Answer

Elad Lachmi picture Elad Lachmi · Mar 1, 2011

In the developer app on Facebook go to the app and edit settings. In the Facebook integration section you can set "IFrame size" to auto-resize. Then in your app, call FB.Canvas.setAutoResize after FB.init and the canvas should resize itself to fit your content automatically.