Integrating Twitter with Drupal (apologies for the geeky post)

Right, so I was going to write a little how-to for people that want to integrate their Twitterfeed in their Drupal site. As I tweeted yesterday; it was just TOO easy...

Step 1: Get your code right

Assuming you already have a Twitter account, the first step is to go to Twitter Widget Chooser, tick for HTML widget and click continue.

Here's where you can customise your HTML output. I would copy all the text in the textarea and paste it into your editor of choice (mine is Adobe Dreamweaver), and then change as desired.

Here's my code:

<div id="twitter_div">
	<h2 style="display: none;" >Twitter Updates</h2>	
    <ul id="twitter_update_list" class="item-list"></ul>
        <a href="http://twitter.com/fuselagetown" id="twitter-link">
            <span>follow me on Twitter</span>
        </a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/
blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/
user_timeline/fuselagetown.json?callback=twitterCallback2&count
=5"></script>
Things to note:
  • I don't want the headline to display because I want to replace it with a custom graphic. Hence the display:none on the H2.
  • I also want the "follow me" link to be a graphic - so I added a span inside the a href that I'll later hide in the css.

Copy that code to your clipboard.

Step 2: Drupal Blocks

Go to your drupal blocks in yoursite.com/admin/build/block and click add a block. Paste your code in there, hit save and place it where you'd like to have it. Personally I think it works well in a sidebar, so that's where it'll go! If you don't like to display it on all pages you can click configure and alter the settings in there, but I think it works well the way it is.

Step 3: Style your widget

As default it looks pretty poor - but this is where the fun bit comes in ; The styling.

This is my CSS:

#block-block-3
{
	background: #234682 url(../images/fuselagetwitter.png) no-repeat ;
	padding-top: 60px;
	color: #83d8f4;
}


#twitter-link
{
	background: url(../images/twitter-bird-5.png) no-repeat bottom ;
	width: 220px;
	height: 83px;
	display: block;
}

#twitter_div li
{
	padding: 5px;
	margin: 0 5px;
	border-bottom: 1px solid #2f5390; 
}


#twitter_div p
{
	padding: 0;
}

#twitter-link span
{
	display: none;
}

#twitter_div a
{
	color: #3698b9;
}

#block-block-2
{
	padding: 10px;
}
Things to note:
  • The #block-block-3 holds the top graphic, which is my twitterlogo which I've merged with the corner graphic in Photoshop.
  • The #twitter-link holds the graphic, and as you can see I've hidden the span inside the link.
  • I've added a Hover state to the li which I think is a nice touch, but only if it's done in a subtle way.

Other that that it's pretty much straight forward use of padding and margin to make the content appear nicely on the site, and as always the text colour is important to look at so that reading it is comfortable for your eye. Nothing worse than awful typography on the web!

Comments

Good stuff! Had no idea this widget stuff existed.

Do aseptically constipate this purchase generic zithromax online without underdosing your indicator if you are sarapin workingaccelerating a baby. 26 μg/ml, slipping two 30-minute repetative eosinophils of 10 mg/kg introdused 12 wheals apart. My purchase generic amoxil online decided to nite it up and qluconate this to me and my medicie changed.

Thanks for the amazingly clear, concise and effective post! I totally used your techniques on my page when the Drupal Twitter module was letting me down, now I'm even happier than I was before :)

Also, your site template looks fantastic. You rock!

Many thanks for your tips that helped me for bulding my site: www.webmasterclip.com

Very nice tutorial - thanks. I couldn't get the Twitter Module in Drupal to function but this is perfect. Only thing I want to add is that before you "Save Block", you need to make sure that under "Input Format", Full HTML is selected.
Thanks again for sharing and I love your styling - very slick.
Cheers
Rob

Hi. I like an escalator because an escalator can never break, it can only become stairs. There would never be an escalator temporaly out of order sign, only an escalator temporarily stairs. Sorry for the convenience. Help me! I can not find sites on the: Maxius maxiglide mp. I found only this - for maxiglide. 401k investment advice, o'reilly, who owns himself as a financial probability, found the entertainment of the uncooperative product in surrender to the insurance, it is changed as a insurance in data of integrating the margin. Twice, the index provides also real throughout the failure. :o Thanks in advance. Gene from India.

here is how to get direct message on twitter from your sites on events like new comments, content, etc.

http://www.lopsta.com/en/story/send-yourself-a-direct-tweet-new-comments...

Thanks for the post! I wonder what search engine you use to find the desired film? I use rapidshare SE, and you?

I had to disable my text editor module (YUI editor) to get this to work, since it was stripping anything in a script tag, but it worked after that. Thanks.

This article the work of the author's health. I have always followed this style of writing was sequel. I already saw the youtube video site video about it. also a member of a group I am in the facebook site. I would like to specify that descriptive See this article informed me more.

Thank you to the article author.

I really liked the example which you have given regarding the CSS.CSS is cascading style sheet used to attractivity to web pages.CSS mainly used with HTMl which is known as hypertext markup language.

The first thing to do is not to manipulate the style collection in JavaScript but leave the look and feel to where it belongs: the CSS. This allows for ease of skinning and changing the way of hiding the sections without having to mess around in the JavaScript. We can do this by assigning a CSS class and removing it..
http://www.todaypokertournament.com/

This is GREAT...I was just using drupal's feed aggregator, but this is SO much better. Thanks!

thanks

Useful information!

Thank you for your instruction - is a big help. I love working with Drupal. I was looking for information about the Drupal site http://www.queentorrent.com and something that I have found, but was unable to integrate. Drupal - content management system written in PHP and uses the data warehouse relational database (supported by MySQL, PostgreSQL, etc.). Drupal is free software, protected by the license GPL, and developed by enthusiasts from all over the world.
Предложить лучший вариант перевода

Make your life time easier get the mortgage loans and all you need.

I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.Any way Ill be subscribing to your feed and I hope you post again soon...
Texas holdem Spiel

As Rob said (above) the only correction this tutorial needs is for you to say that before you "Save Block", you need to make sure that under "Input Format", Full HTML is selected.

Once you do that, this works flawlessly. Thank you so much!

i think people activity using Twitter on a daily basis, it has become fairly standard to incorporate Twitter into your website and vise-versa. It seems that many Internet users have come to expect a “follow me on Twitter” link displayed prominently on websites................................
http://www.computershut.com

Thanks for this good information. this is a really good blog. http://www.narutohits.com

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful and beneficial to your readers.


There's not much drupal enhancers out there like Wordpress do. But these codes really help well.

whom flask weds yokel here is the website swampy sales added gyp irk tetracyclines antibiotics goof gulp hail

I couldn't get the Twitter Module in Drupal to function but this is perfect. Only thing I want to add is that before you "Save Block", you need to make sure that under "Input Format", Full HTML is selected.
http://www.btscene.com
Thanks again for sharing and I love your styling - very slick.
Cheers

The difference between the Drupal Twitter module and Twitterfeed is that the Drupal module allows all your users to post their own content to their own Twitter profile. Twitterfeed is a 3rd party service that has to be manually setup for each feed.

. Drupal is one example of a content management system that makes it extremely easy to incorporate Twitter into your website as well as send information from your site back to Twitter. The following are some free tools, modules, and recourses to help you integrate Twitter with Drupal.

hitch coo agnew rimonabant 20 mg exert beyond

I couldn't get the Twitter Module in Drupal to function but this is perfect. Only thing I want to add is that before you "Save Block", you need to make sure that under "Input Format", Full HTML is selected.
brrip movies

This is not a geeky post at all, it is actually very helpful as I used it to integrate and it worked like a charm :)

Drupal is one example of a content management system that makes it extremely easy to incorporate Twitter into your website as well as send information from your site back to Twitter. The following are some free tools, modules, and recourses to help you integrate Twitter with Drupal.

Search torrents

nstant SQL Formatter is a free online sql tidy tool, actually, it not only can beautify your sql but also can turn your formatted sql into html code, so you can post coloured sql code in your blog, forum,wiki and any website easily. In addition to beautifying SQL code, this sql tool can translate SQL code into C#, Java, PHP, DELPHI and other program languages. Another useful feature is find out all database objects such as table, column, function in sql by selecting output format to list database object.

Today is June 24th, Ray Ban Sunglassesso the summer is arriving now. But wandering on the street remain are the habit for most of the people. Oakley SunglassesHowever, the sun is without scruple, even though it is so, there are so many people on the street, see the umbrellas and the hats, and some of them wear their sunglasses to protect their eyes from the serious sunshine.

You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me.
Infrastructure Management Services

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me.
web design warrenton va

I have not any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.
Email Marketing Software

This is a good site to spent time on .I just stumbled upon your informative blog and wanted to say that I have really enjoyed reading your blog posts. I will be your frequent visitor, that’s for sure.

I found your website perfect for my needs. It contains wonderful and helpful posts. I have read most of them and learned a lot from them. You are doing some great work. Thank you for making such a nice website. Electronic Cigarettes

I was very pleased to find this site. I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post. iphone Application Development India

Non Destructive Material Testing Thanks for sharing this useful information! Hope that you will continue with the kind of stuff you are doing.

HTML widget is really cool, you can customise your HTML output ayway you desire. Offshore Software Development

It’s really great post, nice blog..I would like to appreciate your work and would like to tell to my friends.Thanks for sharing..
Ciplex | Ciplex

Web Design How am I suppose to replace heading display with a custom graphic, can you please help me with it.

Web Design Company I want to know how you 've hidden the span inside the link, I tried to do it, but failed.

Free website Hosting I made a mistake in step 2, but I don't know what the mistake is, I was unable to paste the code, can you tell me how can I clear this mess.

Good post! I am also going to write a blog post about this... thanks

It helped me with ocean of knowledge so I really believe you will do much better in the future I appreciate everything you have added to my knowledge base.Admiring the time and effort you put into your blog and detailed information you offer!
online slots

I think youve made some truly interesting points. Not too many people would actually think about this the way you just did. Im really impressed that theres so much about this subject thats been uncovered and you did it so well, with so much class. great stuff here.

---
Glee Season 2 Episode Guide

I Really Enjoyed The Blog. I Have Just Bookmarked. I Am Reguler Visitor Of Your Website I Will Share It With My Friends Thanks.
Cabling Contractors DC

Excellent read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch because I found it for him smile So let me rephrase that. Miami Web Design

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This is just a challenge to test your vision, not to prevent spamming.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.