• Resolved gwinnie

    (@gwinnie)


    Greetings everybody! I have a bit of a Javascript newbie question.

    My site is a photo blog using Infinite Scroll version 2.0b2.110709 for seamless post loading. Additionally, I am using WP Facebook Like 1.5.1 and Google +1 1.0.4 for buttons after posts.

    Problem is, when Infinite Scroll loads more posts after user scrolls down, FB Like and G+1 buttons are no longer loaded after the posts. I presume that this could be addressed in an Infinite Scroll post-load Javascript. I’ve been trying to look at the buttons coding, but I still have no idea what JS functions to call to load the Like and +1 buttons for the additional posts.

    Thanks a bunch for any hints!

Viewing 10 replies - 16 through 25 (of 25 total)
  • wtfgray

    (@wtfgray)

    Hi, im having similar problem like the 1st one in this topic. But im using a bit diferent infinite scroll script and only facebook share button. Mine infinite scroll script is here: https://github.com/paulirish/infinite-scroll/blob/master/jquery.infinitescroll.js

    Can I get some help?

    wtfgray

    (@wtfgray)

    well I just realized that this infinite scroll is the same that WP plugin is build at, but im using it alone, without plugin. So I still need this help, plz ??

    Hi bear,
    suddenly, after the the first page, my FB share botton doesn’t appear again! ??

    what’s happen! ??

    antoniocaparrelli.com
    debug is ON

    @ant0nio

    Add the following to your javascript to be called after page load:

    FB.XFBML.parse();

    You might be able to remove the existing:

    window.fbAsyncInit = function()
    						{
    							FB.init({appId: 115079708540175, status: true, cookie: true, xfbml: true});
    						};
    						(function()
    						{
    							var e = document.createElement('script'); e.async = true;
    							e.src = document.location.protocol + '//connect.facebook.net/en_PI/all.js';
    							document.getElementById('fb-root').appendChild(e);
    						}());

    See what works ??

    It works! You are really kind!
    Thank you so much! ??

    It doesn’t work for me … what did i do wrong?

    I use the the last Infinite Scroll version …

    Having the same problem here!
    The Like box problem is fixed thanks to the FB.XFBML.parse(); code posted by beaver, thanks!!

    But I also use the facebook comment count function, after pageload it does display a number (0), but that number is not correct..
    <fb:comments-count href=https://example.com/></fb:comments-count>

    Also, I use a Tweet box, with this JS code:
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=”//platform.twitter.com/widgets.js”;fjs.parentNode.insertBefore(js,fjs);}}(document,”script”,”twitter-wjs”);</script>
    It does not display Tweet box image anymore after page load.

    Beaver, any thoughts??

    How do we get this working with the official twitter code below:

    <script src="https://platform.twitter.com/widgets.js" type="text/javascript"></script>
    
       <a href="https://twitter.com/share" class="twitter-share-button"
          data-url="<?php the_permalink(); ?>"
          data-via="MikeDefiesLife"
          data-text="<?php the_title(); ?>"
          data-count="horizontal">Tweet

    That is in the meta data of my posts that appear on the index page.

    What do i need to do to get it working with infinite scroll?

    Thanks

    In the “Javascript to be called after the next posts are fetched” window:

    twttr.widgets.load();

    Thanks, works a tweet ??

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Infinite scroll vs. FB Like and G’ is closed to new replies.