Monday, April 18, 2011

Post Your Twitter feed to your blogger blogspot blog

Want to post Your twitter feed to your blogger blogspot page. It's really easy just copy the code below and paste it into an html widget. The widget is found by going to the design tab and pasting the code into a "new html widget" box.

<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 6000,
width: 300,
height: 300,
theme: {
shell: {
background: '#ffffff',
color: '#343434'
},
tweets: {
background: '#ffffff',
color: '#343434',
links: '#000080'
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'all'
}
}).render().setUser('franks_blog').start();
</script>

It looks like this. 


OK, so what if you want to change these parameters to a different twitter feed? Well to do this you have to alter the html code. 

1. Choose your twitter feed:
Change }).render().setUser('franks_blog').start();
To: }).render().setUser('your_twitter_user_name').start();

2. Change the number of tweets to display.
Alter  rpp: 4, to the required number e.g rpp: 10,

3. Change the dimensions of the tweets to fit your page.
width: 300,
height: 300,

Just change the pixel width numbers to your requirements.

4. Change the colour of the tweets or background of tweets to display.
tweets: {
background: '#ffffff',
color: '#343434',
links: '#000080'
Again fairly obvious and easy to do.

These are probably the most useful parameters that you will need but you can fine tune most of the code to get your twitter feed to match your site perfectly. Experiment with it!