បង្កើត Face Book Comment

Web IT2 copyបង្កើត Face Book Comment ជាមួយ Javascript
1
1- Open Link https://developers.facebook.com/docs/reference/plugins/comments/
2- Set Web Url, whidth, number post and get Code
13- JavaScript SDK and Copy Code

114- HTML

<head>

<script type=”text/javascript”  <script src=”https://connect.facebook.net/en_US/all.js”></script>

</head>

<body>

<!– Javascript Part–>

<h2>Face Book Comment</h2>

<div data-href=”http://www.books4u.me” data-width=”470″ data-num-posts=”10″></div>

</body>

 5- Javascript Part

<!–facebook–>

<div id=”fb-root”></div>

<script>

window.fbAsyncInit = function () {

// init the FB JS SDK

FB.init({

appId: ‘YOUR_APP_ID’,                        // App ID from the app dashboard

channelUrl: ‘//WWW.YOUR_DOMAIN.COM/channel.html’, // Channel file for x-domain comms

status: true,                                 // Check Facebook Login status

xfbml: true                                  // Look for social plugins on the page

});

// Additional initialization code such as adding Event Listeners goes here

};

// Load the SDK asynchronously

(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”;

fjs.parentNode.insertBefore(js, fjs);

} (document, ‘script’, ‘facebook-jssdk’));

</script>

<!–facebook–>