making facebook and google plus share button

making facebook and google plus share button

In this post we will show you making facebook and google plus share button, hear for making facebook and google plus share button we will give you demo and example for implement.

I think everybody sees a share button on websites and wonder that it is complex to implement. But in reality, it is so easy and you don't need to use any official API or libraries for that. All you have to do is embed the URL of your web page into the following HTML snippet. If you are using facebook SDK for authentication then you can explicitly ask for permission for posting in user feed when they logged in. But it is a little more complex method as we need to use facebook SDK and create an app and get permissions from facebook after verifying app etc. So I am skipping that method for another time.
Here is the code for making facebook share button in your website
<a  href="https://www.facebook.com/sharer/sharer.php?u=<?php echo "http://shareurcodes.com"; ?>" target="_blank">
  Share on Facebook
</a>
Here is the code for making google plus share button in your website
 <a href="https://plus.google.com/share?url=<?php echo "http://shareurcodes.com/"; ?>" onclick="javascript:window.open(this.href,
  '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
    <img src="https://www.gstatic.com/images/icons/gplus-64.png" alt="Share on Google+"/>
</a>

Hope this code and post will helped you for implement making facebook and google plus share button. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs us

Comments