Jetpack: add hashtags to tweets sent by Publicize

Jetpack’s Publicize module allows you to automatically publish your posts to your favorite Social Networks like Twitter or Facebook.

You can customize the message that is posted to Social Networks thanks to the small input field right above the Publish button:

Publicize Options

But what if you wanted to automatically add details to each Publicized post? Since both Twitter and Facebook support hashtags, you could append the post tags after the post title, like so:

Tweet tags

To do so, add the following code to a functionality plugin:

function jeherve_publicize_hashtags() {
	$post = get_post();
	if ( ! empty( $post ) ) {

		// Grab the tags of the post
		$post_tags = get_the_tags( $post->ID );

		// Append tags to custom message
		if ( ! empty( $post_tags ) ) {

			// Create list of tags with hashtags in front of them
			$hash_tags = '';
			foreach( $post_tags as $tag ) {
				$hash_tags .= ' #' . $tag->name;
			}

			// Create our custom message
			$custom_message = get_the_title() . ' ' . $hash_tags;
			update_post_meta( $post->ID, '_wpas_mess', $custom_message );
		}
	}
}

// Save that message
function jeherve_cust_pub_message_save() {
	add_action( 'save_post', 'jeherve_publicize_hashtags' );
}
add_action( 'publish_post', 'jeherve_cust_pub_message_save' );

Google Social Analytics : Analyser les actions sociales sur votre site WordPress

Avec le lancement de son bouton +1, Google s’est intéressé de plus près au tracking des différentes actions “sociales” dans Google Analytics. Le premier bénéficiaire des améliorations sociales ajoutées dans la dernière version de Google Analytics a bien sûr été le bouton +1, mais vous pouvez désormais suivre correctement le nombre de tweets, de Facebook Like et unlike sur votre site. Voici comment tracker ces actions sur votre site WordPress.

Continue reading Google Social Analytics : Analyser les actions sociales sur votre site WordPress

Intégrer Twitter sur votre blog WordPress : guide complet

Twitter est désormais devenu un outil quasiment indispensable pour nous blogueurs : il nous permet de partager vos articles, engager la discussion avec d’autres blogueurs, découvrir des articles intéressants, …

Mais afin d’en tirer encore plus d’avantages, il est aussi intéressant d’intégrer Twitter sur vos blogs, afin qu’il soit facile pour vos lecteurs de vous retrouver, d’engager la conversation, ou de partager vos articles. Voyons donc dans cet article comment intégrer Twitter à WordPress d’une façon simple et efficace.

Continue reading Intégrer Twitter sur votre blog WordPress : guide complet

Custom Tweet Button for WordPress

Earlier on this blog, we have seen how to add a twitter dialog box on your blog. This was achieved using the @anywhere library from Twitter. In this article, Nicolas Gallagher shows us how to integrate a Twitter tweet button, with the very same features that the official button has, plus some more!

If you feel comfortable playing a bit with your theme’s code, this method is for you: it will allow to have much more power over the display and the features of the twitter button on your blog.

Read the article on Nicolas’ Blog >>

(via digwp.com)

How to: add a twitter dialog box anywhere on your blog

Update: Twitter Anywhere is now deprecated. You won’t be able to use the method described below to insert a Twitter dialog box in your posts. Please check Twitter’s announcement post for alternatives.

Twitter has become a very useful tool for all bloggers, and allows us to share and promote useful articles to fellow bloggers. Naturally, we have seen more and more twitter functions integrated into our blogs; the latest Official twitter button has even made it easier to integrate twitter buttons on your blog.

But what if you do not want of a standard twitter button, but rather of a new and easy way for your readers to contact you via twitter? Luckily, Twitter @anywhere is here for you, and in that tutorial, we will see how to easily integrate at twitter box to any part of your blog, thanks to this service and the WordPress shortcodes! Continue reading How to: add a twitter dialog box anywhere on your blog