jssocials
jssocials copied to clipboard
Shares counter not working
All our shares counters are showing as zero. Can you please let me know how to fix? Thanks
I am having the same is as @qcharlotteq. The only counter working is the facebook counter. Below is my code.
// Extract index from the slide selected
function extractSlideIndex(slide) {
var selectedSlide = slide.toString();
$.getJSON( photoAPIUrl , function( data ) {
var gallery = data.acf.event_gallery_field;
// determine the starting index
$.each(gallery, function(index, value) {
if(value.photo.title === selectedSlide) {
loadSocialShareBtns(value.photo.url);
$(".ScrollContainer").slick("slickGoTo", parseInt(index));
}
});
});
}
// Social share buttons
function loadSocialShareBtns(link) {
$(".ShareContainer").jsSocials({
url: link,
showLabel: false,
showCount: "inside",
shareIn: "popup",
shares: ["email", "twitter", "facebook", "linkedin"]
});
}