1. (그누보드)
<?php
$id_url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?bo_table='.$bo_table.'&wr_id='.$wr_id;
$num_posts = 5;
$width = 700;
?>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="<?php echo $id_url?>" num_posts="<?php echo $num_posts?>" width="<?php echo $width?>"></fb:comments>
2.
<!-- facebook comment markup START-->
<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/ko_KR/all.js#xfbml=1&appId=발급받은 아이디";
fjs.parentNode.insertBefore(js, fjs);
} (document, 'script', 'facebook-jssdk'));</script>
<!-- facebook comment markup BEGIN-->
<div id="fb-s-media">
<div class="fb-comments fb-url" data-href="<?php $url ?>" data-width="375">
</div>
</div>
<script type="text/javascript">
$(".fb-url").attr("data-href", document.URL);
$(".g-url").attr("href", document.URL);
</script>
<!-- facebook comment markup END-->
댓글 없음:
댓글 쓰기