Friday 03 Sep 2010   
Add Comment

CFFEED - Twitter example

ColdFusion Tutorial #38

As Twitter's popularity continues to increase, users and consumers of the information being broadcast are looking for quick and easy ways to integrate some of the information into their own content. So I whipped up this short, but sweet, example of how easy it is to repurpose content from Twitter using just a dash of ColdFusion.

demo.cfm

If you're using ColdFusion 8, then all you have to do is use CFFeed to consume the feed. Here's a sample line of code:

As you'll see, CFFeed creates a very nice query object containing quite a bit of information for you. One field of interest at this point is the "CONTENT" field which contains HTML-formatted code for each tweet. If you prefer a "text-only" version of the tweet, then simply use the "TITLE" field. So, to show how easy this is, let's just loop over the feed items and output the "CONTENT."



Demo

See this code running!


Download

Download this code as a zip!


Comments

a
a @ Monday 01 Feb 2010 - 09:37:22 PM

Click button to add a comment


Author

Stephen Withington


Published

Thursday 18 Jun 2009

Original

This tutorial has been modified and published with permission of the author. The original tutorial can be found here
http://www.stephenwithington.com/blog/index.cfm/2009/3/4/Use-ColdFusions-CFFeed-to-Display-Your-Twitter-Tweets-and-more-on-Your-Blog-in-30-Seconds 

Tags

cfcatch  cfdump  cffeed  cfoutput  cfset  cftry