This week, Google introduced a new social service called Google Buzz. I have been testing it a bit and haven’t decided how much I like it. Whether you like it or not, one thing is clear, people are going to use it so we might as well make it easy for them to share your content on Buzz. So, inspired by the Buzz It button that TechCrunch created for their site, I figured it wouldn’t be too hard to hack one together for WordPress.
Some caveats before we go on:
- This is not a WordPress Plugin. To use it you will have to make a small change in your template. You should be comfortable doing that and know how to get yourself out of it before you go breaking your blog.
- Like the TechCrunch button, this uses Google Reader to share your link. So, using this link will require that your reader’s Google Reader shared account be hooked up to their Google Buzz account. This is typically set up when you start using Buzz so shouldn’t be a problem.
What does it do?
The code below will let you put a link on your site that says ‘Buzz This’. You can change the words to say what ever you want. For example, you could change it to ‘Share With Google Reader’ so that could be useful to people whether they use Buzz or not.
When your new link in clicked, the user gets a new page showing the typical Google Reader sharing screen including the link and blog entry title as well as an excerpt from your post. It will look like this:
For a working example, you can see the bottom of this post on my blog.
What do I need to do?
At the bottom of this post there is a snippet of code. Copy that to your clip board.
Next, log in to WordPress blog and find the Appearance section on the left-hand side. Click the Editor link.
You will need to find the right place to put the code. Hopefully you know this and it quite possibly could be different depending on the design of your blog but it should be something like Single Post.
In my case it is Single Post so you click that and look through the code for the place where you want to put it. There is a lot that might not look familiar but you should be able to spot a point in the code between your blog post and the comment section (if that is where you want to put the link).
Paste the code into that spot and then click the Update File button at the bottom of the edit window. Then go look at your blog to see how your link looks. Go back and edit if you need to change the location.
I’m sure someone will make a plugin that will make this whole process more simple for people that don’t want to mess with code. I like the simplicity of it and not having to maintain another plugin.
UPDATE 15FEB10: Skip down to the comment made by Otto. He has some improvements that make his code even better. Here is a link right to Otto’s Comment.
Here is the code. Copy everything between the sets of ========:
<a rel=”nofollow” target=”_blank” href=”http://www.google.com/reader/link?url=<?php echo get_permalink() ?>&title=<?php the_title();?>&snippet=<?php the_excerpt(); ?>&srcURL=<?php echo get_settings(‘home’); ?>” Title=”Share this via Google Reader”>Buzz This</a>