开发者

Hiding horizontal scrollbar of IFrame in Facebook Application

开发者 https://www.devze.com 2023-04-12 02:36 出处:网络
I was looking for solutions, but most of it was outdated or doesn\'t work correctly. At the of of my document (开发者_开发知识库main file of FB application - index.php), I have added:

I was looking for solutions, but most of it was outdated or doesn't work correctly. At the of of my document (开发者_开发知识库main file of FB application - index.php), I have added:

<script>
window.fbAsyncInit = function() {
   $('#iframe_canvas').css({'overflow': 'hidden'});
   FB.Canvas.setAutoResize();
}
</script>

I was also trying with setSize({width and height}). As I see previous versions has "remove scrollbars" option within Canvas settings - which is now removed. I was trying to change iframe, iframe > html and iframe > body CSS to overflow: hidden, overflow-x: hidden and many others. Also with JavaScript without effect. Could anyone point the right path? Previously solutions found on stackoverflow doesn't help either.


I would play with the two options in Advanced settings for your application called: Canvas width and Canvas height. And see if a particular combination of those work. Also the setAutoResize is being deprecated in favor of setAutoGrow(). See https://developers.facebook.com/docs/reference/javascript/FB.Canvas.setAutoResize/

0

精彩评论

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