Listing Twitter Feed in ColdFusion 7

I am porting a ColdFusion site to GoDaddy, which has an older version (7).  I want to list the most recent feeds like I have at www.joyofritual.com in the bottom right corner.  

I can't use CFFEED.  Is there a way to replicate the attached code without CFFEED?
<cfset feedurl = "http://twitter.com/statuses/user_timeline/56786200.rss" />
			<cftry>
				<cffeed source="#feedurl#" properties="feedmeta" query="feeditems" />
				<ul id="navlist">
				<cfoutput query="feeditems" maxrows="5">
					<li><span class="BODY">#right(feeditems.content,len(feeditems.content)-15)#</span></li>
				</cfoutput>
				</ul>

			
				<cfcatch>
					<cfoutput>
						Twitter temporarily off line.
					</cfoutput>
				</cfcatch>
			</cftry>

Open in new window

dougfosterNYCAsked:
Who is Participating?
 
sandy12879Commented:
Well if you need to read the rss.xml... below code can help you..

<cfset urlAddress="http://twitter.com/statuses/user_timeline/56786200.rss">
<cfhttp url="#urlAddress#" method="GET" throwonerror="yes" resolveurl="yes"/>
<!---validation flag --->
<cfset XMLVALIDATION = true>
<cftry>
<cfset fileCont= trim(cfhttp.FileContent)>
<!---create the xml document object--->
<cfset xmlDoc = xmlParse(fileCont, false)>

Let me know if it works for you ...
0
 
Ray PaseurCommented:
This looks like a site that matters to someone's livelihood.  Why would you want to put it on GoDaddy when there are other hosts that have current CF hosting available?  See the recommendations here:
http://www.adobe.com/products/coldfusion/hosting/

I would reconsider the strategy of trying to shoe horn this into GoDaddy.  The money you save, if any, is likely to be eaten up the first time you need to ask them for tech support.
0
 
dougfosterNYCAuthor Commented:
Well, I already have an account with a bunch of websites.  All my new sites are on hostgator, which I love.  But this is CFand the hosting is already paid for.  The site is working now, so this is the last remaining issue.

So, how about the original question?  How can I get a list of the last 5 feeds from a Twitter account?
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
dougfosterNYCAuthor Commented:
CFFEED, which I can't use because I am going to use CF7, does a great job parsing out the content to output a list of items.  That is what I want, a list of their last Twitter submissions like at the bottom right of the current site at www.joyofritual.com.  That uses CFFEED, and that is what I want the output to be.

Any way to get just the content and not the other stuff?
0
 
dougfosterNYCAuthor Commented:
Well, I figured out my own problem.

to get a list in ColdFusion 7 use the xmlparse function and use a loop as in the code below....

<cfset urlAddress="http://twitter.com/statuses/user_timeline/56786200.rss">
			<cfhttp url="#urlAddress#" method="GET" throwonerror="yes" resolveurl="yes"/>
			<!---validation flag --->
			<cfset XMLVALIDATION = true>
			
			<cfset fileCont= trim(cfhttp.FileContent)>
			<!---create the xml document object--->
			<cfset xmlDoc = xmlParse(fileCont, false)>
			
			<ul id="navlist">
			<cfoutput>
				<!-- loop through feed items.  Take out initial "barbarabiziou: " text manually by removing first 15 characters. -->
				<cfloop index="x" from="1" to="5"> 
				<cfset theItem = #xmlDoc.rss.channel.item[x].title.xmlText#>
				<li><span class="BODY">#right(theItem,len(theItem)-15)#</span></li>
				</cfloop>
			</cfoutput>			
			</ul>

Open in new window

0
 
sandy12879Commented:
Well i suggested the same...you just had to play with the variable "XMLDOC' to ge your required result.Glad you figured it out.
0
 
sandy12879Commented:
Well i suggested the same...you just had to play with the variable "XMLDOC' to ge your required result.Glad you figured it out.
0
 
dougfosterNYCAuthor Commented:
This was the correct approach.  I just had to flesh out some details to implement the solution.
0
 
dougfosterNYCAuthor Commented:
Thanks Sandy.  Yours was the correct approach.  
0
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.