Index: functions.php
===================================================================
--- functions.php	(revision 15869)
+++ functions.php	(working copy)
@@ -58,6 +58,31 @@
 add_action( 'wp_head', 'profiles_output_rel_canonical' );
 
 /**
+ * Outputs opengraph tags for user profiles.
+ */
+function profiles_output_opengraph() {
+	if ( !bp_is_user_profile() || !bp_is_current_action( 'public' ) ) {
+		return;
+	}
+	$bio       = bp_get_profile_field_data( array( 'field' => 'About Me' ) );
+	$url       = bp_displayed_user_domain();
+	$image_url = get_avatar_url( bp_displayed_user_id(), array( 'size' => 1024 ) );
+	$full_name = bp_get_displayed_user_fullname();
+	$username  = bp_get_displayed_user_username();
+
+?>
+<meta property="og:type" content="profile" />
+<meta property="og:title" content="<?php echo esc_attr( $full_name ); ?> - WordPress user profile" />
+<meta property="og:description" content="<?php echo esc_attr( wp_trim_words( $bio, 25, '&#8230;' ) ); ?>" />
+<meta property="og:url" content="<?php echo esc_attr( $url ); ?>" />
+<meta property="og:site_name" content="WordPress" />
+<meta property="og:image" content="<?php echo esc_attr( $image_url ); ?>" />
+<meta property="profile:username" content="<?php echo esc_attr( $username ); ?>" />
+<?
+}
+add_action( 'wp_head', 'profiles_output_opengraph' );
+
+/**
  * Hide the WordPress admin bar
  */
 function profiles_hide_admin_bar() {
