Facebook App - Javascript Set Height Of Canvas?
I am trying to set the height so I don't have a scrollbar in my facebook app, seen HERE I have used jQuery to create the canvas plugin using the GRAPH API and have tried adding the
Solution 1:
window.fbAsyncInit = function() {
FB.Canvas.setSize({height: 1050});
}
// Do things that will sometimes call sizeChangeCallback()functionsizeChangeCallback() {
FB.Canvas.setSize();
}
Solution 2:
Just for clarification for other users who happen on this content:
Add the
<script src="http://connect.facebook.net/en_US/all.js"></script>
and<script> FB.init({ appId : 'here_your_API_id', status : true, cookie : true, xfbml : true }); </script>
code before your
</head>
tag.- Add the
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
`<script>window.fbAsyncInit = function() {FB.Canvas.setSize({height: 1050});}`
`functionsizeChangeCallback() {FB.Canvas.setSize();}</script>`
portion right before the </body>
tag.
If all else fails, try the following:
<style>body {width:500px; height:1050px;overflow:hidden;margin:0; padding:0; border:0;}</style>
Post a Comment for "Facebook App - Javascript Set Height Of Canvas?"