LDDG Posted March 23, 2016 Share Posted March 23, 2016 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 More sharing options...
LDDG Posted March 23, 2016 Author Share Posted March 23, 2016 Can anyone please help with this? Link to comment Share on other sites More sharing options...
opentype Posted March 23, 2016 Share Posted March 23, 2016 Not much to go on. What is the incorrect link? Which code did you use? Can we see a live URL where this is happening? Link to comment Share on other sites More sharing options...
LDDG Posted March 23, 2016 Author Share Posted March 23, 2016 Just now, opentype said: Not much to go on. What is the incorrect link? Which code did you use? Can we see a live URL where this is happening? Yes, give me a min... Link to comment Share on other sites More sharing options...
LDDG Posted March 23, 2016 Author Share Posted March 23, 2016 Ok, Here is the current FB share button: When hovering over this FB button, I get the following WORKING CORRECTLY link: https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.losdurosdelgenero.com%2Finicio%2Fentrevista-exclusiva-a-%C3%B1engo-flow-de-noti-under-r4266%2F 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> </a> 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: https://www.facebook.com/sharer/sharer.php?app_id=1708992449339832&sdk=joey&u=https%3A%2F%2Fwww.facebook.com%2Fsharer%2Fsharer.php%3Fu%3Dhttp%253A%252F%252Fwww.losdurosdelgenero.com%252Finicio%252Fentrevista-exclusiva-a-%25C3%25B1engo-flow-de-noti-under-r4266%252F&display=popup&ref=plugin&src=share_button 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 More sharing options...
LDDG Posted March 23, 2016 Author Share Posted March 23, 2016 3 hours ago, opentype said: Not much to go on. What is the incorrect link? Which code did you use? Can we see a live URL where this is happening? I posted the info you asked for Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.