English 中文(简体)
facebook点赞按钮和点赞框不能同时显示
原标题:facebook like button and like box cannot show at same time

如果我只运行其中一个,那么它可以正常显示。

如果我同时运行这两个代码,最先出现的代码将显示,而最下面出现的代码不会显示。

我认为有一些冲突。

有人面临这个问题吗?

<html doctype="XHTML 1.0 Transitional" xmlns:fb="http://www.facebook.com/2008/fbml">

<head></head>

<body>


<div class="fbLikeButton">
<fb:like show_faces="false" width="300"></fb:like>
<div id="fb-root"></div>
<script>
          window.fbAsyncInit = function() {

        FB.init({appId:  XXXXXXXX , status: true, cookie: true,
             xfbml: true});
          };
          (function() {
        var e = document.createElement( script );
        e.type =  text/javascript ;
        e.src = document.location.protocol + //connect.facebook.net/en_US/all.js ;
        e.async = true;
        document.getElementById( fb-root ).appendChild(e);
          }());
        </script>
<br>
</div>


<!-- facebook code -->



<div align="center">

<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US"></script>

<script type="text/javascript">FB.init("de15667c632963d186082c258e3cc970");</script>

<fb:fan profile_id="XXXXXXXXXX" stream="0" connections="6" width="155" height="350"></fb:fan>

</div>


</body>

</html>
最佳回答

好的,现在可以用了。

我认为这是javascript代码的冗余。

只需要删除其中一个javascript引用。

我删除了<;script type=“text/javascript”src=“http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US“>;<;/script>;

问题回答

暂无回答




相关问题
C# Building An Array with Button Entries

I have a set of buttons that I want to add into an array so that they are ordered. The buttons I have are: Monday0700Button Monday0730Button Monday0800Button Monday0830Button and so on. How do I ...

Text in disabled and css styled button shows movement in IE

I have disabled and css styled buttons. In Firefox, disabled buttons do not move at all when pressed (which is what is expected), in IE, the text in the buttons still moves a few pixels. Why does ...

Where is Button.DialogResult in WPF?

In System.Windows.Forms.Button there is a property DialogResult, where is this property in the System.Windows.Controls.Button (WPF)?

How to create a submit button template in Oracle APEX?

I m trying to create a template for a button in Oracle APEX but I don t seem to have access to the appropriate substitution strings to make it work. For non-templated buttons APEX seems to insert a ...

Removing text from HTML buttons on all browsers?

We have buttons of many sizes and colors that use background images. There is a label on the background image itself, but we need to keep the button s text in the HTML for usability/accessibility. How ...

Back button loop with IFRAMES

In my (school) website we use Iframes to display class blogs (on blogger). This works well EXCEPT if the user then clicks on (say) a photo inside the iframe. Blogger (in this case) then displays the ...

ruby on rails on click events

I am so sorry if this question seems too easy but I can t seem to find it anywhere. I am creating a ruby in steel project. I have created a html.erb and rb file in a vs project (ruby on rails). My ...

热门标签