[英]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.