I experimented with various solutions, including the Shareaholic WordPress plugin. Although I no longer use it, I do like this plugin a lot. It is easy to install and works as advertised. Ultimately though, it wasn't what I was looking for.
I wanted something different - a flexible way to easily insert native share buttons, with as little code as possible. Just the buttons, fully configurable. No branding. PHP Socializer is my attempt at implementing this.
With it, one can include a GitHub repository watch button (provided by Mark Dotto) with the following code:
1 2 3 4 5 6
use COI\Social; echo Social\GitHub(array( 'username' => 'faceleg', 'repository' => 'PHP-Socializer', 'type' => Social\GitHub\Type\WATCH ));
Most of the time, one won't want to print out just one button. For these cases, PHP Socializer provides a 'button manager' class to smooth the process.
For example, to prepare & print a Twitter, LinkedIn & StumbleUpon button for this post:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
PHP Socializer has more helpful features (like automatic Google Analytics integration, per-button overrides, easy extensibility...). I will describe them in detail in future posts.
In the mean time, checkout PHP Socializer's source!