Add a Google Buzz Button to BuddyPress Activities in Under a Minute

July 14, 2010  | 
5 Comments

Google Buzz offers you one more way to allow users to share links to your website. In just two days after launching, Buzz had nine million posts and comments with approximately 200 posts per minute from mobile sites. While those numbers have gone down since its debut, it demonstrates how much influence Google services have in the landscape of social media.

If you want to leverage the power of Google’s sharing capabilities, a Buzz button is one of the best ways. It allows users to share content that is longer than the allowed limits for Twitter and Facebook. I previously posted a way to add the button in a post called 5 Ways to Incorporate Google Buzz Into WordPress and BuddyPress, but in the meantime I’ve discovered another way that incorporates the button more seamlessly and makes it look like a natural part of BuddyPress. Check out the screenshot below:

A Buzz button will be added to the activity entry meta area of each post on your BuddyPress site, enabling users to share the permalink of that particular post with their followers on Google Buzz. Clicking the button will launch the Buzz window:

Add the Google Buzz Button in 2 Simple Steps:

Step 1: Add the Buzz button javascript to your header.php file:

<script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script>

Step 2: Add this function to your BuddyPress child theme’s functions.php file:

function my_gbuzz() {
$activitylink = bp_get_activity_thread_permalink();
echo '<a title="Post to Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="link" data-url="' . $activitylink . '"></a>';
}
add_action( 'bp_activity_entry_meta', 'my_gbuzz' );

I found this quick trick on the BuddyPress forums, thanks to Simon Dabkowski and r-a-y, which provided the basics for this idea. I like this solution, because there’s no need to get 10 folders deep in BuddyPress theme files. You can do both steps through your WordPress dashboard theme editor in less than a minute. Get your site more exposure with this simple, unobtrusive Buzz button.

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - Send beautiful html email newsletters, from WordPress!

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Add bottom corner (or anywhere else) chat to your site

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

5 Responses to Add a Google Buzz Button to BuddyPress Activities in Under a Minute

  1. Great Thank You Sarah just added the codes on my website and working perfectly as you have on this post.

  2. Pingback: Wordpress Belarus » Blog Archive » Add a Google Buzz Button to BuddyPress Activities in Under a …

  3. Thanks for the mention Sarah and thanks for taking it a step further and creating a function as r-a-y suggested on the forums.

  4. Pingback: Themes by the bucket load: Friday Find | Premium BuddyPress Themes at BuddyDress

  5. Great post.

    I’d like to add Facebook Like and Share buttons to the activity entry meta area of each post. How would I adjust the code to enjoy that function too.

    Thanks for your great work :)

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting