简体   繁体   English

FB Like按钮不会显示

[英]FB Like button won't show

I have no Java experience, I've purely followed the FB 'walkthrough' but had no luck. 我没有Java经验,我只是遵循FB的“演练”,但是没有运气。 Basically I'm looking to add this button, a little under the welcoming image and align right. 基本上,我希望在欢迎图像下方添加一点此按钮并向右对齐。 Helpful if I could see the darn thing... 如果我能看到该死的东西很有帮助...

  .container { padding-top: 0px; padding-left: 0px; padding-right: 10px; font-family: arial; z-index: 2; } a { float: right; text-decoration: none; padding-left: 10px; color: #003399; } li { display: inline; } .navbar { float: right; padding-top: 75px; padding-bottom: 45px; padding-right: 0px; z-index: 2; } #intro img { position: absolute; display: block; margin: auto; max-width: 100%; height: auto; z-index: 1; } .fb-like { position: absolute; display: block; z-index: 3; } 
 <!DOCTYPE html> <html> <head> <title>St George's League - Home</title> <link rel="stylesheet" href="stylesheet.css"> </head> <body> <div id="fb-root"></div> <script language="JavaScript"> (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <div style="min-width: 800px; min-height: 600px; margin: 0 auto"> <div class="container"> <ul> <div class="nav"> <li> <img src="images/sgl-logo.jpg" height="145px" alt="SGLLogo" /> </li> <div class="navbar"> <li class="contact"><a href="contact.html">CONTACT</a> </li> <li class="about"><a href="about.html">ABOUT</a> <li class="leagues"><a href="leagues.html">LEAGUES</a> </li> <strong><li class="home"><a href="index.html">HOME</a></li></strong> </div> <!--Nav End--> </div> <!--Navbar End--> </div> <!--Container End--> <div id="intro"> <img src="images/intro.jpg" /> </div> <!--Intro End--> </div> <!--Style End--> <div class="fb-like" data-href="https://www.facebook.com/StGeorgesLeagues" data-width="80" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"> </div> <!--FB Like End--> </body> </html> 

I can't find anything wrong with the initial script or the call to it to display the button. 我找不到初始脚本或其调用显示按钮的任何错误。 With Facebook you can have a personal page and you can also be an admin on other pages as well. 使用Facebook,您可以拥有一个个人页面,也可以成为其他页面的管理员。 Where this is embedded at your site the button will not display unless you are logged into Facebook. 除非您登录Facebook,否则将不会显示该按钮。 If not logged into Facebook you'll get a small clickable link that says login. 如果未登录Facebook,您将获得一个小的可点击链接,其中显示登录信息。 Once you then login to Facebook that login link will disappear and the like button will pop up. 一旦您登录到Facebook,该登录链接将消失,并且将弹出“赞”按钮。 Just to be thorough I pasted your code into my website and your like button displayed just fine... 为了更彻底,我将您的代码粘贴到了我的网站中,并且您的“喜欢”按钮显示得很好...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM