2011-10-14 38 views
1

我真的很困擾如何讓滾動條從我的標籤。我只是試圖爲一家公司的Facebook頁面創建一個Facebook標籤,並且我已經嘗試了一切以使垂直滾動消失。這裏是我正在使用的代碼Facebook作爲標籤滾動條 - 仍然沒有運氣

 <head> 
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> 
<link href="facebookstyles.css" rel="stylesheet" type="text/css" /> 

<script type="text/javascript" src="scripts/jquery.innerfade.js"></script> 





<fb:share-button type="icon_link" class="url"></fb:share-button> 



</head> 


<body> 

<table> 

CONTENT 

</table> 
<p>&nbsp;</p> 
<p>&nbsp;</p><div id="fb-root"></div> 
<script> 
    window.fbAsyncInit = function() { 

    FB.init({appId: '{{277868305571181}}', status: true, cookie: true,xfbml: true}); 

    window.setTimeout(function() { 
     FB.Canvas.setSize({height:1500}); 
    }, 250); 

    }; 
    (function() { 
    var e = document.createElement('script'); e.async = true; 
    e.src = document.location.protocol + 
     '//connect.facebook.net/en_US/all.js'; 
    document.getElementById('fb-root').appendChild(e); 
    }()); 
</script> 

    </body> 
</html> 
+0

您是否在您的[應用高級設置](http://developers.facebook.com/apps)中將您的** Canvas Height **設爲可設置? – ifaour

+1

你頭上有一個分享按鈕?嘗試刪除共享按鈕並添加FB.Canvas.setAutoGrow();而不是setSize。 –

回答

1

您可能需要在應用程序設置中啓用OAuth2。

<div id="fb-root"></div> 
    <script> 
     window.fbAsyncInit = function() { 

     FB.init({ 
appId: '277868305571181', 
status: true, 
cookie: true, 
xfbml: true, 
oauth : true // enable OAuth 2.0 
});  
FB.Canvas.setAutoGrow(); 
     }; 
     (function() { 
     var e = document.createElement('script'); e.async = true; 
     e.src = document.location.protocol + 
      '//connect.facebook.net/en_US/all.js'; 
     document.getElementById('fb-root').appendChild(e); 
     }()); 
    </script>