Create a Live Twitter Feed Ticker in Xcelsius
In this week’s Reportapalooza challenge, I saw a cool feature in Mico’s Ronald McDonald House dashboard. On the bottom of her dashboard, Mico hooked up a twitter feed to a Ticker component, which is an awesome use case for this component. I found the RSS link on my Twitter page to transform my Twitter page into an RSS feed and was up and running in minutes. Here is how you can do the same for your Xcelsius marketing and demo dashboards.
- Go to any twitter page and on the bottom right pane, click on RSS Feed….
- Copy the URL which looks something like this: http://twitter.com/statuses/user_timeline/166445794.rss
- Open up Xcelsius where we will first use XML maps to load our RSS feed
- Assuming you are using Excel 2007, open up the Developer tab. If you don’t see the “Developer” tab in your Excel, you need to enable it. Instructions
- Click on “Source” button in the Developer Tab
- Click on the XML Maps Button
- When the XML maps dialogue appears, click “Add”
- Now you will paste your RSS feed URL right into the “File Name” text box and press OK.NOTE: DO NOT USE “https://” in your address. Instead, use ‘http://” so the URL should look something like this http://twitter.com/statuses/user_timeline/166445794.rss
- Excel will connect to the RSS feed and then prompt you to inform you that it will create a generic schema.
- Click OK
- Now on the XML maps window, you will see all of the feed nodes.
- Select the “Title” and “Link” nodes and drag them into contiguous cells.
- Right click on the titles, hover over “XML” and then click refresh. Now you should see a data sample of the latest twitter posts.
- Go to the data manager and add XML Maps.NOTE: If you decide to change your twitter feed, you do not need to re-do steps 5-14.. Instead you can simply change the URL from the XML maps data connection. If however you make any changes to your XML maps inside of Excel, you will need to delete the XML maps connection in the Xcelsius data manager and re-add it for the changes to take effect.
- If you are going to publish your SWF to a server, you have to use a proxy because the Twitter crossdomain file does not allow Flash requests from other servers. The crossdomain headache is quickly bypassed using a PHP proxy that I have included with the source files. Instead of hitting the twitter URL directly the URL in the XML Maps data connection will look something like this: http://yourserver/crossdomain-proxy.php?url=http://twitter.com/statuses/user_timeline/166445794.rss
- In the Xcelsius data manager, you can set your feed to refresh. I recommend every 5 minutes or so.
- Insert the ticker component from the selectors component library.
- Bind the labels to your column with the title.
- Setup “Rows” insertion
- Select the source data property and bind it to the column with your twitter links.
- Set the destination cell where your URL will be insert.
- Insert a URL button from the Web Connectivity folder.
- Bind the URL to the same destination cell where your URL goes. Don’t worry about the URL title because we are going to hide it.
- Go to the URL Behavior tab and set the trigger cell to the same cell as the URL and set it to trigger on change.
- Now when you click on the ticker it will open into a new web page with the twitter post.
Make sure you vote for your favorite Reportapalooza dashboard!
A useful, if obscure, trick to avoid the proxy hassle is to use Twitter's search api which has an open crossdomain policy and also supports RSS.