Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8006667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:35:22+00:00 2026-06-04T17:35:22+00:00

I have a list of posts and a load more button to load more

  • 0

I have a list of posts and a “load more” button to load more posts on an infinite scroll like twitter, etc.

The thing is that each post has Facebook Comments, but I don’t want to load ALL the comments of EACH post.

So, I did this in jQuery:

function showFbComments(id) {
var commentBox = '<div class=\"fb-comments\" data-href=\"http://www.tusecreto.com.ar/' + id + '\" data-num-posts=\"20\" data-width=\"100%\"></div>';
if($('#fb_comentarios_' + id).hasClass("loaded")) {
    $('#fb_comentarios_' + id).toggle();
} else {
$('#fb_comentarios_' + id).addClass("loaded").append(commentBox).toggle();
}
}

This way, when I click on “50 Comments”, the function showFbComments will show my “fb_comentarios_id” DIV and append the Facebook HTML5 code.

The problem is that the comments won’t show after the page is loaded. If I click the link before the page is fully loaded the show just fine.

I think it has to be something about the JS of Facebook. I mean all that…

<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/es_ES/all.js#xfbml=1&appId=152950781809";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Is there any way to load comments asynchronously?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:35:23+00:00Added an answer on June 4, 2026 at 5:35 pm

    I think I found the answer: https://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/

    I just added

    FB.XFBML.parse(document.getElementById('#fb_comentarios_' + id));
    

    after the append and it’s working now. Is this correct?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple blog page - a list of posts that each consist
I have a list of post links that have tags inside an inner div.
I have a dynamic list of items that will be used to POST information
I have got jquery post function jQuery('.more-button').live('click', function(eve){ var page = jQuery(this).attr('id').replace('more-button-',''); loaded_messages +=
I have a story model that has many posts. I list the stories in
I have read the other posts, e.g., vim: Executing a list of editor commands
So what i have in mind is showing a list with most popular posts
i have list of rows that user select and i want to delete them,
I have a list of data or quotes that are being displayed, I only
Basically, I have a string of functions that load a set of blog entries

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.