The other day i saw this article on The Next Web about adding a Google+ share icon to your WordPress blog. It is based on the original article from Alex Moss. The main limitation is that it uses the mobile version of Google+ to make it work. Not a big deal just not that pretty.
So I thought this is pretty handy and while WordPress is huge among bloggers, there are still tons of other sites and blogs that might want a sharing button. Then I thought I could take it a step further and include a way to add attribution.
On Google+, you give someone attribution or address someone by putting a + in front of their name. For example +George Washington. Google Plus then turns these into links and notifies the person they have been mentioned in a post. The problem is, if you “+” some one that isn’t in one of your Circles it doesn’t always work. Unless you know the little known secret: you can “+” a user number and it should work everytime. This also ensures your are attributing the right +John Smith! My code below will take advantage of this feature since people outside of your circles could be sharing from your site.
So, how do you get your user number? Just go to Google Plus and click on your profile. Your user number is that big bunch of numbers up in your url
Note: If you want to use attribution, replace the numbers after via + with the numbers from YOUR user number. Be sure to leave the “+” there!
If you do NOT want to use attribution, delete everything between the quotes after attrib=. So it should read: attrib=’ ‘
Here is the same code in a text file that should make it easier to use since these kinds of things with quotation marks can get confused by browsers. share.txt
You shoud be able to use this code on any site that lets you add html. Google may have something else in the works to make this easier. But for now, this should fill the gap.