Im trying to resize the canvas app iFrame size – it lets me adjust the height but not the width, the width is always set to 520px and height to 900px;
The documentation shows how you can set the canvas app settings through the developer apps but the settings are not there for me, how weird. I’ve tried autoResize, autoGrow and other options, running out of ideas here now.
This is the code that i am using;
<div id="fb-root"></div>
<script src="https://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId: 'my_app_id',
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true // parse XFBML
});
</script>
<script type="text/javascript">
window.fbAsyncInit = function () {
FB.Canvas.setAutoResize(true);
}
</script>
Try the following function by providing explicit width and height:
To see more – https://developers.facebook.com/docs/reference/javascript/FB.Canvas.setSize/