Google Plus Facebook Like Twitter Tweet Buttons Code

Finding out some wordpress plugins of Google Plus, Facebook Like and Twitter’s Tweet buttons, some performance and other issues were faced, due to which I thought to find out direct code & scripts of all, and make them self embedded in the theme. If you looking for how to add buttons for Google Plus, Facebook Like and Twitter Tweet in a blog or website, there here are the simple >scripts / code you can add in your site:

Google Plus Button Code

Following is the script, and the div, which you can add anywhere in your code, for adding the Google Plus button in your website. Preferable is to add the script in the header tag, and then the div, where you want the Google Plus button to be shown, but you can also use the script and div together, like below:

<script type=”text/javascript” src=”https://apis.google.com/js/plusone.js”></script>
<div class=”g-plusone”></div>

 

Twitter Tweet Button Code

Following is the script, which you can add anywhere in your code, for adding the Twitter Tweet button in your website:

<a href=”https://twitter.com/share” class=”twitter-share-button”>Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=”//platform.twitter.com/widgets.js”;fjs.parentNode.insertBefore(js,fjs);}}(document,”script”,”twitter-wjs”);</script>

 

Facebook Like Button Code

Following is the script, which you can add anywhere in your code, for adding the Facebook Like button in your website:

<script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script>
<script type=”text/javascript”>
document.write(‘<fb:like layout=”button_count” show_faces=”false” width=”100″></fb:like>’);
</script>

 

If you have any other easy solution for any of all of these mentioned above, please share or comment.

Uncategorised

Leave a Reply

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