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

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

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:

{code type=html}

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

{code type=php}
function my_gbuzz() {
$activitylink = bp_get_activity_thread_permalink();
echo ‘‘;
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.