Every social website offers some-kind of JavaScript code to insert their button on webpages. Unfortunately, there’s no standard when it comes to the JavaScript code itself — some, like Google+’s +1 button are fairly sophisticated, with different ways to load and render the button, and others like LinkedIn, offer just a simple JavaScript URL to fetch. Here are Google+ and LinkedIn’s suggested buttons for comparison.
|
1 2 3 4 5 6 7 8 9 10 11 |
<!-- Place this tag where you want the +1 button to render. --> <div class="g-plusone" data-size="medium" data-annotation="none"></div> <!-- Place this tag after the last +1 button tag. --> <script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> |
|
1 2 |
<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script> <script type="IN/Share" data-counter="top"></script> |



