Skip to main content
Inspiring
June 10, 2012
Answered

cfhttp 'internal server error' with Flickr feed

  • June 10, 2012
  • 1 reply
  • 603 views

Hi all, I am trying to cfhttp 'get' a Flickr feed URL, but am seeing 'internal server error'.

The code is

<cfhttp url="http://api.flickr.com/services/feeds/photos_public.gne?id=flickr_userID" method="GET" resolveURL="yes"></cfhttp>

<cfscript>

    Content = trim(cfhttp.filecontent);

    Content = XMLParse(Content);

</cfscript>

where the flickr_userID parameter has the format nnnnnnnn@Lnn   (ie 8 digits plus @ symbol plus capital letter plus 2 digits).

At first I thought the problem arose from needing to add 'resolveURL = "yes"' to the cfhttp call, but adding this did not resolve.

So is there perhaps an issue with the encoding of the id parameter?

Any advice much appreciated thanks,

cf_rog

    This topic has been closed for replies.
    Correct answer cf_rog

    Think I've found the answer.   The default format for Flickr feeds is Atom, you have to add a 'format' parameter to the URL to specify other formats.

    I tried changing the URL to

    http://api.flickr.com/services/feeds/photos_public.gne?id=flickr_userID&format=rss2

    and this has resolved the 'internal server error'.

    Guess I should have read this page more closely  

    http://www.flickr.com/services/feeds/


    1 reply

    cf_rogAuthorCorrect answer
    Inspiring
    June 10, 2012

    Think I've found the answer.   The default format for Flickr feeds is Atom, you have to add a 'format' parameter to the URL to specify other formats.

    I tried changing the URL to

    http://api.flickr.com/services/feeds/photos_public.gne?id=flickr_userID&format=rss2

    and this has resolved the 'internal server error'.

    Guess I should have read this page more closely  

    http://www.flickr.com/services/feeds/