Answer the question
In order to leave comments, you need to log in
How to use comments from Facebook on a news site?
Facebook comments stopped working on different pages of the news site.
Used like this:
<div class="fb-comments" data-href="" data-numposts="5"></div>
<script>
jQuery( function( $ ) {
if ( 'undefined' === typeof FB )
return;
if ( $( 'body' ).hasClass( 'single-post' ) || $( 'body' ).hasClass( 'page' ) ) {
var $comments_div = $( '<div/>' );
$comments_div.addClass( 'fb-comments' );
$comments_div.attr( 'data-href', document.location );
$comments_div.appendTo( $( '.primary-content' ) );
FB.XFBML.parse();
}
} );
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question