请注意,下面的代码工作正常,当我点击按钮时,FB Like 按钮可以工作,但是当我刷新页面时,FB Like 按钮和其他随附的统计信息(喜欢的数量,喜欢的人的面孔)消失了
非常感谢任何帮助。谢谢 !!!
<body>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.ge`enter code here`tElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=38135740xxxxxxx";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="selection">
<div class="logo">
<img src="images/NA/jpg" height="100" width="180" />
</div>
<h3> <?php echo $favs[0]->name?>'s top five products</h3>
<?php // print_r($favs[0]);?>
<div class="selected">
<div class="product"><img src=<?php echo '"../'.$favs[0]->photo1.'"'?> alt="Image not available" height="175" width ="175"/></div>
<div class="product"><img src=<?php echo '"../'.$favs[1]->photo1.'"'?> alt="Image not available" height="175" width ="175"/></div>
<div class="product"><img src=<?php echo '"../'.$favs[2]->photo1.'"'?> alt="Image not available" height="175" width ="175"/></div>
<div class="product"><img src=<?php echo '"../'.$favs[3]->photo1.'"'?> alt="Image not available" height="175" width ="175"/></div>
</div>
<span style="float:left;padding-top: 10px;">Do You like the products above?</span>
<div id="fb-root"></div>
<div class="fbLike">
<fb:like send="false" width="400" show_faces="true"></fb:like>
</div>
</div>
<div class="textDesc">
<h3>Participate in the Contest & Get to Know us More</h3>
<p>You can also participate in the contest & get know us more by simply visiting us at</p>
</div>
</body>