is there any way how to auto resize the iframe(canvas) to show all my content? I don't want the scrollbar. I tried every JS method and nothing worked.
Asked
Active
Viewed 1,285 times
3 Answers
0
Or...
jQuery(window).load(function(){
FB.Canvas.setSize();
});
Wait till everything has loaded then reset the size.

DanV
- 3,193
- 4
- 29
- 43
0
I use this code and it works for all content height's, even when I need to decreased it:
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR_APP_ID',
status : true,
cookie : true,
xfbml : true,
oauth: true
});
FB.Canvas.setSize({height:600});
setTimeout("FB.Canvas.setAutoGrow()",500);
};

red_alert
- 1,738
- 14
- 24
0
It's possible but it's quite tedious. See this answer here: Resizing an iframe based on content

Community
- 1
- 1

citizen conn
- 15,300
- 3
- 58
- 80
-
Thanks, but the topic is almost 3 yrs old. There must be some another solution (I would rather shoot myself in my leg than implement this code). – Ginnyous Jul 14 '11 at 22:42
-
It still applies, cross domain scripting is a security constraint which is there for a reason. – citizen conn Jul 14 '11 at 23:00
-
1I find [the solution!](http://forum.developers.facebook.net/viewtopic.php?id=91458) – Ginnyous Jul 14 '11 at 23:23
-
awesome! Good to know. You can answer your own question too : ) – citizen conn Jul 14 '11 at 23:29