Remove scrollbars from Facebook page tab app?

There are hundreds of posts on the Internet about this, many of which are located here on StackOverflow, but unfortunately none of the solutions mentioned work for me. I spent most of 6 hours on a lesson without success.

Here is what I have:

But I can't for life set the iFrame height so that I can safely remove the scroll bars!

Here is the structure of my HTML code:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>PARKROYAL Magic Moments</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/style.css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> </head> <body> <MAIN CODE HERE> <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 }); </script> <script type="text/javascript"> window.fbAsyncInit = function() { FB.Canvas.setSize( { height: 1642 } ); } // Do things that will sometimes call sizeChangeCallback() function sizeChangeCallback() { FB.Canvas.setSize( { height: 1642 } ); } </script> </body> </html> 

In my CSS, I also set body {overflow: hidden}

Any ideas?

+7
source share
1 answer

Have you tried FB.Canvas.setAutoGrow . You can use it like this: -

  <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({ appId : '235024806624460', }); FB.Canvas.setAutoGrow(); } </script> 
+13
source

All Articles