Skip to main content
April 14, 2011
Question

Unable to read the source URL error for cffeed

  • April 14, 2011
  • 1 reply
  • 3916 views

Hi,

I am using the cffeed to read from my twitter RSS feed but I get this error:

Unable to read the source URL.

Status Code: 400. Try adding or changing UserAgent attribute in the CFFeed tag

My code is:

<cfset feedurl="http://twitter.com/statuses/user_timeline/somenumbers.atom" />

<cffeed 
source="#feedurl#"
properties="feedmeta"     
query="feeditems1" overwrite="true" />

It works but suddenly it stops and it takes time about 15 minutes or more  to work again.

Can any body help me with this?

Thanks,

Mandana

    This topic has been closed for replies.

    1 reply

    Inspiring
    April 15, 2011

    Did you try what the error message suggested?

    --

    Adam

    April 15, 2011

    I tried this one which is useragent attribute:

    <cffeed 
        source="#feedurl#"
        properties="feedmeta"
        query="feeditems1" overwrite="true"
        useragent="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64; Trident/4.0; GTB6.6; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; AskTbBLPV5/5.11.3.15590)" />

    I found the user agent by this : cfdump #cgi.http_user_agent# and copy/paste it in useragent attribute but still does not work.

    Inspiring
    April 17, 2011

    I'm not sure what to suggest.  It might be something coming through the feed which CF doesn't like.  Modify your code with a try/catch and if it errors, do a CFHTTP on the URL instead, and have a look @ what it's returning: see if there's anything that CFFEED wouldn't like (like malformed XML).

    --

    Adam