Skip to content

Instantly share code, notes, and snippets.

@phwd
Created May 13, 2012 23:07
Show Gist options
  • Save phwd/2690706 to your computer and use it in GitHub Desktop.
Save phwd/2690706 to your computer and use it in GitHub Desktop.
Facebook comments skeleton
<!DOCTYPE html>
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
<meta charset="utf-8">
<title>Comments Plugin</title>
<meta name="description" content="Example of Facebook Comments"</title>
<meta property="fb:app_id" content="YOUR_APP_ID">
<meta property="og:url" content="YOUR_URL">
<meta property="og:title" content="Comments Plugin">
<meta property="og:description" content="Example of Facebook Comments">
<script async="" src="http://connect.facebook.net/en_US/all.js"></script>
</head>
<body class="main">
<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=YOUR_APP_ID";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="YOUR_URL" data-num-posts="2" data-width="470"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment