Sharing On Social Media Using AddThis Plugin In PHP

Rating: 5.0. From 1 vote.
Please wait...

Shaing on Social Media plays a key role in sharing of information in today’s world where we can easily share our information with millions of people through a social platform.Being a developer we always need to implement social sharing buttons on most of our sites.

So today we are here with a short but most interesting and important snippet for a developer Sharing On Social Media Using AddThis Plugin In PHP,which will  give us all predefined codes and the only thing we have to do is to implement these codes in our site or page and the rest will automatically work for us.

addthis.com is a website which provides us tools or we can say widgets to use on our site for social sharing purposes.

The only thing we have to do is that
Visit addthis.com and create a account and this will redirect you on dashboard where you can select a tool
the tool can be sharing buttons , follow buttons , related posts etc.
Let say we have choosen sharing buttons then we will be redirected to the page where we can customize buttons according to our need like size,colour,type,number and also social medias on which we want to share.

And the last step is the code which is going to be provided by addthis according to the critria of buttons we have choosen and we have to implement it on our site
Addthis will provide you code for html,wordpress,tumbler and many more platforms

let say we have to implement the code on our PHP or HTML page then we have to simply paste the below script above the closing </body> of the HTML

1
2
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5978d6b7d49d2fa1"></script>

The above code is based on our customization you can also customize according to your need.

Now you have to copy another piece of code and have to paste it where you want the social media buttons to appear

1
2
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_inline_share_toolbox"></div>

And this will simply provide you a functionality of social sharing of your page where you have used this code on social media.

This snippet is very useful for developers ,they can use it easily and it will work fine with all type of projects.
Hope this tutorial will help our developers and our attempt towards a hurdles free world for developers is not going in waste.
For more tutorials of your choice please comment us or you can also mail us.
You can also read our tutorials

UNDERSTANDING SQL COMPARISON OPERATORS
Preventing SQL Injection In PHP
Because Hurdles aren’t really Hurdles

Be First to Comment

Leave a Reply

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

Solve : *
26 − 16 =