
Steps to add social-share widget to WORDPRESS
After binging for a while, I found a rather nice library for sharing posts in main stream social platforms. Here is its github repository: https://github.com/overtrue/share.js.
The following is how I integrate this widget into my wordpress site.
Step 1:
Import this library to my site using cloudflare.
Adding these two lines of code in your footer.php file. You may be using different WP theme other than mine, so find the footer.php in your theme accordingly.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/css/share.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/js/social-share.min.js"></script>
</body>

Step 2:
In order to use this widget for every post you write, you have to find the post’s content php file in your theme. As for my theme, the file is content.php. After that, place a single line of code in that file.
<div class="social-share"></div>

Step 3:
Write a test post and check it.
Everything should be working properly.