Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Consuming Twitter RSS feed using ColdFusion

Status
Not open for further replies.

3dColor

Programmer
Jan 10, 2006
240
US
I would like to do a search on Twitter using their API and return two recent results into my web page using Coldfusion.

I have looked over the Twitter API documentation but I can't figure out what parameters I am supposed to use to get the Twitter info in to my page.

Below is a try I did that didn't work just for the authors name.

Code:
<cfhttp url="[URL unfurl="true"]http://search.twitter.com/search.atom?q=denver&lang=en&rpp=2"[/URL] method="GET"></cfhttp>

<cfscript>
XMLContent = trim(cfhttp.filecontent);
XMLContent = XMLParse(XMLContent);
</cfscript>
<cfloop from="1" to="#ArrayLen(XMLContent.rss.channel.item)#" index="idx">
<cfoutput>
Author: #XMLContent.rss.channel.item[idx].author.xmlText#<BR>
</cfoutput>
<hr>
</cfloop>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top