问题
I am attempting to add a Facebook like button with a comment box to a site. When you click the like button you will be like the Facebook page itself, that is, Facebook.com/thesitesname
. Where can I find a good starter example that will allow this to work?
I am getting the like button but no comment box...
<div id="fb-root"></div>
<script>
(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_US/all.js#xfbml=1&appId=111116358987784";
fjs.parentNode.insertBefore(js, fjs);
} (document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like"
data-href="http://www.facebook.com/ASITE"
data-send="false"
data-layout="box_count"
data-width="50"
data-show-faces="false" d
ata-font="arial">
</div>
回答1:
In the page for the Like Button, the last question in the FAQ section:
When I click the Like button, the popup window (or "flyout") doesn't show. Why?
If the Like button is placed near the edge of an HTML element with the overflow property set to hidden, the flyout may be clipped or completely hidden when the button is clicked. This can be remedied by setting setting the overflow property to a value other than hidden, such as visible, scroll, or auto.
来源:https://stackoverflow.com/questions/10320539/how-to-create-a-facebook-like-with-a-post-comment-box