Automatically tweet your latest articles and shortened URLs from Drupal

January 13, 2010 - 19:23

If you use drupal as a blogging platform you would want to auto tweet your new posts on to twitter. Twitter and Shorten module provides you with the basic framework required to do this and all you will need to get it working is to configure these modules. There is also a small patch that has to be applied to the twitter module (until the patch goes into the CVS) to allow the use of shortened URLs in the tweet.

The steps are as follows.

1) Download and enable the following modules.
- Twitter
- Twitter Actions
- Trigger
- Shorten

2) Download and apply the patch from

3) Go to Admin » Site Configuration » Actions » Manage Actions
From the 'Make a new advanced action available' drop down pick

Post a Message to Twitter

In the new page that comes up enter twitter Username & Password. For the twitter message use something like "New Article: %title - %tinyurl"

4) Go to Sitebuilding » Triggers » Content

Under "Trigger: After saving a new post" select "Post a message to Twitter"

5) Show a little love for Drupal. Under Admin » Site Configuration » Twitter Setup, enable "Set source to Drupal when updating Twitter status"

If you see that the shortened URLs point to node/nid instead of the url alias you will have to go to your database and increase the weight of the Trigger module to above Pathauto and Twitter Actions

You are done. Go to twitter and bask in the glory of your drupal expertise ;)

Get Drupal updates straight to your inbox

To prevent automated spam submissions leave this field empty.

Post your comments / questions

Twitter has updated some of its procedures and the code needs updating.

Check out the new Twitter APIs

Thanks for the advice

If you are using Drupal as a blogging platform, you want your new posts automatically to Twitter tweet. Twitter and shorten the module you do this, you need to get the basic framework of the work required to configure these modules. There is also a small patch has been applied to the Twitter module (until the patch to the CVS) allows the use of shortened URLs tweet.