LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » HTML-CSS-PHP-JavaScript / JavaScript Codes » Get Social Share Counts Of URL With Pure JavaScript

Get Social Share Counts Of URL With Pure JavaScript

Get-Social-Share-Counts-Of-URL-With-Pure-JavaScript
Do you want to show your url share count of pinterest, facebook, twitter and google plus to your user then its time to get total social share counts of url with pure javascript little script. socialcount.js is a tiny JavaScript library for getting the counts that a specific website (URL) has been shared on popular social networks like Pinterest, Facebook, Twitter and Google Plus.

Now there are many snippet available online or on many others Blog and website but every one is not able to optimize your blog or website so your need some optimized code snippet. So now checkout out code snippet for your blog and website that will give you all features for your desired code. Now grab the ready to use code and paste it where you want.

Features:

1.) No JQuery File Added.
2.) JavaScript File Added.
3.) No Extra CSS Added.
4.) Simple And Fast Loading Script CDN Files.
5.) Can Work With Any Browser.

How To Add In A WebPage OR Blog?

1.) Just Go To Your “Web Page File” or “Blog”.
2.) Now “Copy” The Below Codes And “Paste” It To There Positions.

Recommended For You:
HTML DIV TAG Table Same Like TABLE TAG Example

Snippet:

<script src="https://cdn.rawgit.com/olahol/socialcount.js/master/socialcount.js" type="text/javascript"></script>
<script>
// Socialcount.get(provider, url, callback(count))
Socialcount.get("facebook", "http://www.google.com", function (count) {
console.log(counts); // { facebook: 1000}
alert(counts.facebook);
});
</script>
<script src="https://cdn.rawgit.com/olahol/socialcount.js/master/socialcount.js" type="text/javascript"></script>
<script>
// Socialcount.all(url, callback(counts))
Socialcount.all("https://www.exeideas.com", function (counts) {
console.log(counts); // { facebook: 1000, pinterest: 1000, google: 1000, linkedin: 1000}
alert(counts.facebook);
alert(counts.pinterest);
alert(counts.google);
alert(counts.linkedin);
});
</script>
<script src="https://cdn.rawgit.com/olahol/socialcount.js/master/socialcount.js" type="text/javascript"></script>
<script>
// Get share counts for the current page address.
Socialcount.get(provider, callback(count))
//Socialcount.all(callback(counts))
console.log(counts); // { facebook: 1000, pinterest: 1000, google: 1000, linkedin: 1000}
alert(counts.facebook);
alert(counts.pinterest);
alert(counts.google);
alert(counts.linkedin);
});
</script>

Customization:

1.) You can change the Codes if your are a Pro. Rest can ask for customization.

Last Words:

That’s all we have. If you have any problem with this code in your template then feel free to contact us with full explanation of your problem. We will reply you as time allow to us. Don’t forget to share this with your friends so they can also take benefit from it and leave your precious feedback in our comment form below. Happy blogging, See you in next article…

You Like It, Please Share This Recipe With Your Friends Using...

2 Responses to “Get Social Share Counts Of URL With Pure JavaScript”

  1. Oh wow it is working. THaank you for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *