Categories
Programming

Simple PHP Code to Include Google +, Facebook, Twitter, Stumble Upon & Digg Button

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

Recently when I had to add a bunch of social media share buttons on a website, I did not come across a consolidated php file that would cover all the major ones into a php file.

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

On to the php code!

I made a php file called sshare.php











Adding this is easy, simply include:


whereever you need to place the share buttons on your website.

P.S : Dont forget to update your twitter username in the code.

By Bhaskar

My name is Bhaskar. I am a CTO and a startup techno guy with 10+ years of experience startups.
Full-time coding in Python, React. Part-time coding in Haskell, Java, C.
Scientifically interested in Music, BioInformatics, Linear Algebra, Category theory, Graph theory.

What excites me: anything that has the potential to disrupt the status quo.

Looking for technical support on a startup idea ?
write at : bhaskar {-at-} knowpapa.com