简体   繁体   English

FB时间轴应用高度停留在800px

[英]FB Timeline App Height Stuck at 800px

I have seen a number of other posts here regarding this which I have used to try and fix my error but it doesn't seem to be working. 我在这里还看到了许多其他有关此问题的帖子,这些帖子我曾尝试修复错误,但似乎没有用。

Essentially I want the height to be 600px. 本质上,我希望高度为600px。 I have tried making this settable to 600px in the app settings as well as a number of different examples of 'fixes' that I have found online however none of this seems to be working for me. 我尝试在应用程序设置中将其设置为600px,以及我在网上找到的许多“修复”示例,但是这些似乎都不适合我。

The last example I used was the following but this is not working: 我使用的最后一个示例是以下示例,但这没有用:

<script type="text/javascript">
window.fbAsyncInit = function()
{
    FB.Canvas.setSize();
}
</script>
</head>

..
..
..

<div id="fb-root"></div>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> 
<script type="text/javascript">
FB.init({
  appId: 'MYAPPID', 
  status: true, 
  cookie: true, 
  xfbml: true
});
FB.Canvas.setAutoGrow(7);
</script>
</body>
</html>

You are using and old method, setAutoResize have deprecated and now you have to use the setAutoGrow , 您使用的是旧方法, setAutoResize已弃用,现在您必须使用setAutoGrow

FB.Canvas.setAutoGrow FB.Canvas.setAutoGrow
https://developers.facebook.com/docs/reference/javascript/FB.Canvas.setAutoGrow/ https://developers.facebook.com/docs/reference/javascript/FB.Canvas.setAutoGrow/

Platform Updates: Operation Developer Love 平台更新:操作开发人员的爱
https://developers.facebook.com/blog/post/565/ https://developers.facebook.com/blog/post/565/

I normally use this bit of code: 我通常使用以下代码:

<script type="text/javascript">
window.fbAsyncInit = function() {FB.Canvas.setSize();}
// Do things that will sometimes call sizeChangeCallback()function sizeChangeCallback()     {FB.Canvas.setSize();}
</script>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId  : "APP_ID",
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml  : true// parse XFBML
});

FB.Canvas.setAutoResize(7);

</script>

and then i set the body to the height i want and also in the app advance settings set height to fluid and it should work fine 然后我将身体设置为想要的高度,并且在应用程序的高级设置中将高度设置为流体,它应该可以正常工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 仅当最小宽度为800px时才执行Javascript - Executing Javascript only if min-width is 800px justifiedGallery:屏幕 &lt;800px 时尝试更改图像路径 - justifiedGallery : Trying to change image path when screen <800px 原型:滚动页面800px时显示元素 - prototype: show a element when scroll page pased 800px 如果窗口宽度在800px至799px之间,则执行JS函数 - Do JS function if window width between 800px and 799px JS-窗口的宽度从高于800px的像素数量减少到800px以下导致触发动作 - JS - Window's width being decreased below 800px from an amount of pixels that are higher than 800px causes an action to trigger 我想移动左导航栏菜单 <div> 屏幕尺寸为800px时返回顶部 - I want to move my Left nav bar menu <div> to Top when the screen size is 800px Javascript-如果窗口宽度&lt;= 800px,则将活动链接移至导航顶部 - Javascript - Move active link to top of navigation if window-width <= 800px 当浏览器的尺寸小于800px时如何隐藏div - How to hide div when browser resizes to less than 800px 当我的窗口宽度小于800px时,如何将js滑块效果更改为淡入淡出? - how do i change the js slider effect to fade when my window width is less than 800px? 如果窗口宽度大于800px时刷新站点,则jQuery click事件不起作用 - jQuery click event doesn't work if I refresh site when window width is bigger than 800px
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM