开发者

Facebook iframe height

开发者 https://www.devze.com 2023-03-20 05:37 出处:网络
is there any way how to auto resize the iframe(can开发者_JS百科vas) to show all my content? I don\'t want the scrollbar. I tried every JS method and nothing worked.It\'s possible but it\'s quite tedio

is there any way how to auto resize the iframe(can开发者_JS百科vas) to show all my content? I don't want the scrollbar. I tried every JS method and nothing worked.


It's possible but it's quite tedious. See this answer here: Resizing an iframe based on content


Or...

jQuery(window).load(function(){
     FB.Canvas.setSize();
});

Wait till everything has loaded then reset the size.


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);
};

0

精彩评论

暂无评论...
验证码 换一张
取 消