Skip to content

Instantly share code, notes, and snippets.

@becsegal
Created September 1, 2010 03:58
Show Gist options
  • Select an option

  • Save becsegal/560201 to your computer and use it in GitHub Desktop.

Select an option

Save becsegal/560201 to your computer and use it in GitHub Desktop.
<div id="fb_comments">
<fb:comments title="Comment Test - Social Plugin" numposts="5"
xid="set_publish_feed_to_false_demo" simple="1"
width="510" reverse="false" publish_feed="false">
</fb:comments>
</div>
<div id="fb-root"></div>
<script>
var timer;
window.fbAsyncInit = function() {
FB.init({appId: '80529a5b4455847bc31b1125b0e92cc2', status: false, cookie: false, xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
timer = setInterval(updateComments, 1000);
}());
function updateComments() {
var iframe_src = $('#fb_comments iframe').attr('src')
if(iframe_src.indexOf('comments.php') > 0) {
clearInterval(timer);
$('#fb_comments iframe').attr('src', iframe_src + "&publish_feed=false");
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment