Blog

Quick steps to add a twitter feed on a SharePoint page

By Edith C.

1.       Insert the XML Web Part on your page:

2.       Open the Tool Pane, and click on XSL Editor button. A popup will appear, then copy and paste the following XSL code:

<?xml version="1.0" encoding="utf-8" ?>

<xsl:stylesheet

     version="1.0"

     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

     <xsl:output method="html" />

     <xsl:template match="rss/channel">

        <style type="text/css">

            .twit_tweet a {

                font-size: 13px;

                color: blue;

            }

            .twit_date {

                font-size: 12px;

                color: navy;

            }

            .twit_holder {

                width: 300px;

            }

        </style>

        <xsl:apply-templates select="item" />

     </xsl:template>

 

    <xsl:template match="item">

        <div class="twit_holder">

            <div class="twit_tweet"><a target="_blank" href="{link}"><xsl:value-of select="description" disable-output-escaping="yes"/></a></div>

            <div class="twit_date"><xsl:value-of select="substring-before(pubDate,' +0000')" /></div>

        </div>

    </xsl:template>

</xsl:stylesheet>

3.       Click ok, then go to the twitter account you want to show, and look for the RSS feed link.

4.       For mine, is http://twitter.com/statuses/user_timeline/37871588.rss so copy the link and go to your SharePoint page, and paste this link into the XML link field.

5.       Click OK, or Apply, and you are done! The list of tweets should look like this:

NOTE: You can add more styles for the XSL code, adding classes, divs, etc. to the XSL code.

 

 

 

Comments

On 19 May 2010 01:00, Programmer said:

How to limit number of tweets to only 1. I want to show only the latest one.

Leave a comment

 
 
 
 
CAPTCHA Image Validation