QuestionsSimple PHP Code to Include Google plus, Facebook, Twitter, Stumble Upon & Digg Button
mmWebetutorial Staff asked 9 months ago

Social Media is an important source of traffic to supplement to organic search results.

I had to individually work out the php codes for Google +, Facebook, Twitter, Stumble Upon & Digg Button .  So here’s what I compiled.

 

<!-- G+ Medium Button --><script type="text/javascript">// <![CDATA[
 (function() { varpo = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; vars = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();
// ]]></script>
<!-- FACEBOOK --><script type="text/javascript"src="http://connect.facebook.net/en_US/all.js#appId=245406032159496&xfbml=1"></script>
<!-- DIGG --><script type="text/javascript">// <![CDATA[
 (function() { vars = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0]; s.type = 'text/javascript'; s.async = true; s.src = 'http://widgets.digg.com/buttons.js'; s1.parentNode.insertBefore(s, s1); })();
// ]]></script>
<!-- Compact Button -->
<!-- STUBMEUPON --><script type="text/javascript"src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script><iframe scrolling="no"allowtransparency="true"style="overflow: hidden; margin: 0px; padding: 0px; border: 0px none;"src="http://badge.stumbleupon.com/badge/embed/5/?url=http%3A%2F%2Fknowpapa.com%2Fphp-share%2F"id="iframe-stmblpn-widget-1"width="50"height="60"frameborder="0"></iframe> <script type="text/javascript">   (function() {     varli = document.createElement('script'); li.type = 'text/javascript'; li.async = true;     li.src = window.location.protocol + '//platform.stumbleupon.com/1/widgets.js';     vars = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);   })(); </script>
<!-- TWITTER --><script type="text/javascript">// <![CDATA[
 tweetmeme_source = 'yourtwitterusername'; tweetmeme_style = 'normal'; tweetmeme_service = 'bit.ly';
// ]]></script><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>

Your Answer
Login
Enter email and password to comment or answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.