Outputting Twitter Atom in Coldfusion

I grabbed the RSS info for a twitter search, but I'm unable to output it in Coldfusion MX 7 (can't use cffeed).

This is the URL: http://search.twitter.com/search.atom?q\x3d+%23activityTracker+from%3Awomenshealth

I've tried a couple different scenarios, but I all I get is errors. I tried using HTTP but it seems like it is looking for the data in XML, but Twitter is giving it to me in Atom. The code below give this error: "Element RSS.CHANNEL.ITEM is undefined in XMLCONTENT. "

I'm looking for a complete code sample if possible. But any help is very much appreciated.
<cfhttp url="http://search.twitter.com/search.atom?q\x3d+%23activityTracker+from%3Awomenshealth" method="GET"></cfhttp>
XMLContent = trim(cfhttp.filecontent);
XMLContent = XMLParse(XMLContent);
<cfloop from="1" to="#ArrayLen(XMLContent.rss.channel.item)#" index="idx">
Author: #XMLContent.rss.channel.item[idx].author.xmlText#<BR>

Open in new window

Who is Participating?
haboltnConnect With a Mentor Author Commented:
Ended up using javascript from the Twitter API

<div id="twitter_div" style="margin-top:0px;">                
  <ul id="twitter_update_list">
    <li class="hidden">&nbsp;</li>
<!--put this right before the </body> tag so twitter doesn't hang up your page load.-->
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/womenshealth.json?callback=twitterCallback2&amp;count=3"></script>

Open in new window

That URL doesn't return any results for me.

Anyway, yes, the result is an Atom feed: xmlns="http://www.w3.org/2005/Atom"

So no, yo won't find any rss.channel.item objects or anything else conforming to the RSS standard.

Search the XML for items using the Atom format, when there are some to find, and you'll get your results.
haboltnAuthor Commented:
BBS - The URL is for a feed, so it wouldn't return a page. My question was that  I was looking for a way to search the XML in Atom format. Thanks anyway.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.