javascript - facebook and twitter share count not updating on share -


the problem facebook , twitter count not updating on share. updating on page refresh. possible display updated count without page refresh on successful share on facebook , twitter wall.

i using following code

<div class="fb-share-button" data-href="<?php echo $domainurl;?>/en/blog-view.php?bid=<?php echo $bid;?>" data-type="button_count"></div> <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $domainurl;?>/en/blog-view.php?bid=<?php echo $blogres['blog_id'];?>">tweet</a> 

and use ajax display more blogs

$.ajax({                 url: 'get_blogs.php',                 type: 'post',                 data: datastring,                 cache: false,                 success: function(html){                     $('#loading').hide();                     $('#bloglist').append(html);                     fb.xfbml.parse();                     twttr.widgets.load();                     var nextpage=parseint(loadid)+1;                     if(nextpage<=totalpages){                         $("#load_more").val(nextpage);                      }else{                         $("#load_more").val('0');                      }                     $("#process_page").val('0');                 }             }); 

i use "fb.xfbml.parse();" , "twttr.widgets.load();" functions displaying of fb , twitter counts articles loaded ajax

thanks in advance

use ajax. ajax refresh particular part in page instead of whole page.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -