Drupal 7: Tweet from Drupal

I wanted to be able to post my from Drupal to Twitter without having to tweet it twice. I found this very nice Twitter module within Drupal to be able to do that. Some instructions are quite simple but it still took me around 2 hours to figure out which setting to use to tweet from Derupal.

Most of these instructions came from Sign in to drupal with your Twitter account page. But there is s very subtle detail that is needed to be able to post to Twitter and most of my time was spent on that; and I fround that option accidentally.

You will need to install OAuth and Twitter modules. I will not go into details as that is very staright forward. You will need to enable OAuthm, Twitter, Twitter Actions and Twitter Post modules; all Twitter modules are included in one Twitter module.

Before moving ahead with any settings, you will need to create an application in Twitter Developer enviroment; you will need consumer key and consumer secret from there. You will need to save these in admin/config/services/twitter. Following 2 steps need to be following before moving ahead:

  1. Give Read and Writeaccess in Application Typein Settings tab
  2. Create Access Tokenin Overview Tab
    1. This step needs to be performed after providing Read and Write access so your application will have write access to post
    2. This will allow this application access to your own account

After you are done creating that app, you will need to provide your site and user access to that application so it can post to your account. For that, you will need to go to users/USERNAME. Edit your account and then go to Twitter Accounts tab. Once there, click on Add Account. This will take you to a Twitter page which will ask you to confirm access to your site to post tweets in the Twitter user account; you will need to be logged in as that user or it will ask you to login as a user before proceeding. Click on Authorize App and it will take you back to your site where the request originated from ; Twitter account will be automatically added to your Twiter account list.

Last change you will need it make is to enable which content type will have Post to Twitter checkbox enabled. For that, you can go to admin/config/services/twitter/post. Check from which content type you want to post to Twitter. Save changes.

Now you are ready to post to Drupal and Twitter at the same time. Once you add/edit content in that that content type, you will have the option of posting to Twitter. By default, its not enabled. So, you will need to enable it for each post. 

This is it. Tweets from Drupal are just one content entry away.

Leave a Reply