How do you add a counter to the Facebook share button (generated via FB.ui)?

This is how I’m generating my share button:

  <a href="#" class="share-btn">Share to Facebook</a>

  <script type="text/javascript">
  function fb_share() {
    var fbMsg = $('.lesson_lt_share_popup').text().trim()
    FB.ui( {
      method: 'feed',
      name: "Chinese Learn Online | Progressive Mandarin Course",
      link: "http://www.chineselearnonline.com/level-test/",
      picture: "http://www.chineselearnonline.com/wp-content/themes/clo/assets/img/images/clo-fb-white.png",
      description: fbMsg
    }, function(response) {
        // do nothing
    });
  }

  // add click event to link using jQuery
  $(document).ready(function(){
    $('.share-btn').on( 'click', fb_share );
  });

But I count find anything about generating a counter in the official docs.

How do do that?


Source: facebook

Leave a Reply