I have spent part of the morning bringing a Twitter feed into Drupal. I can’t show you because its on an intranet site but it was pretty straightforward. I didn’t need to tweet from the site or show multiple feeds. All I wanted to do was show the results of a list in the Drupal sidebar.
I loaded the Drupal Twitter Module to start with and had a play around with that. Very nice, obviously widely used. But actually rather more than I needed.
Then I tried Drupal Twitter Pull. Again a nice module, and much simpler than the main Twitter Module. But I couldn’t easily see how to get it to pull in a list so I did a little more searching. And came up with a very straightforward solution. and rather more push than pull – I used Twitter’s own widgets.
So, the solution was:
- Sign in to Twitter
- Go to Twitter Widgets (you need to sign in first so you see information relevant to your account)
- Choose from the left whether you want a widget for your website or Facebook. (Website in this case).
- Because I specifically want to pull from a list I chose “List Widget” on the next screen
- Then choose your list and settings.
- When everything is set up to your liking, click the Grab Code at the bottom.
One thing I did discover was that the list takes a while to appear. Give it a little time to show the messages from your list.
Now back to Drupal
- In Drupal, if you want this in a block, go to the Blocks admin page: …admin/build/block/list
- Click to Add Block
- And copy your code into the main entry box.
- Don’t forget to select “Full HTML” in the Input Format
- Select Save
- Move your newly created block to wherever you want it to appear on your Drupal page.
- Hey presto! Twitter in Drupal.
