Jump to content

Change FB sharer button so it displays count?


Recommended Posts

How can I change this FB share button:



so that it shows a FB share button with counter such as this one?



I copy the code FB provides for this share/counter button and pasted into the correct template but even though the button showed up without a problem, the link it was providing was incorrect.

Link to comment
Share on other sites


Here is the current FB share button:


When hovering over this FB button, I get the following WORKING CORRECTLY link:


The above working link is produced by the core/front/sharelinks/facebook template,  which contains the following:

<a href="https://www.facebook.com/sharer/sharer.php?u={$url}" class="cShareLink cShareLink_facebook" target="_blank" data-role="shareLink" title='{lang="facebook_text"}' data-ipsTooltip>
	<i class="fa fa-facebook"></i>



Ok, now when I change the code in the core/front/sharelinks/facebook template with the code from Facebook to look like this:

<div class="fb-share-button" data-href="https://www.facebook.com/sharer/sharer.php?u={$url}" data-layout="button_count"></div>


I do get the correct button as seen here:


The above FB share button with counter gives me the following URL:


This code does not work correctly as it does not pass the article's information correctly to Facebook.

This is what I get with this new code:



The website can be viewed at www.losdurosdelgenero.com and I used the very first article as an example.

Thanks for any help!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...