Photo from Chile

Update to Using ColdFusion to Create a Twitter/Google Maps Mashup

That's what I get for banging something out in a couple of hours, and not RTFMing. It turns out that you can get a user's friends via the Twitter API without authenticating. It's just that the ColdFusion Twitter Lib doesn't currently support it. So I made one small change to a method in the library (sorry Pedro), allowing me to request a user's friends without authentication, and changed my code and demo.

So you can now feel safe running the demo.

I discovered a couple of other new things, when I took the time to dig a bit deeper.

The first is that when you ask Twitter's API for a list of friends it will only return 100 at a time, so you need to do paging.

The second is that Google's Geocode API isn't keen on getting dozens of requests in a short period of time. It was rejecting a lot of calls, and therefore the locations were not being reported and the markers were missing from the map. The only way I could find around that, in the limited time that I've devoted to this, was to use ColdFusion's Sleep() function to wait between API calls. Of course that has slowed the whole thing down tremendously, but at least I'm getting more markers on the map.

The new code is attached to this post.

that is pretty slick. good work.
# Posted By PaulH | 5/7/09 11:43 PM
Sorry I did not have seen this post.

Accepted the 5 lines that were changed, feel liberates to contact me or use my blog ( to suggest new alterations, or to indicate applications as this

+++ trunk/Twitter.cfc Thu May 7 21:00:39 2009
@@ -42,7 +42,9 @@
- <cfset userid = />
+ <cfif StructKeyExists(temp,"user")>
+ <cfset userid = />
+ </cfif>

@@ -97,7 +99,7 @@
- <cfset values = ListAppend(values,'#key#=#arguments.options[key]#','&') />
+ <cfset values = ListAppend(values,'#lcase(key)#=#arguments.options[key]#','&') />

@@ -405,7 +407,19 @@
- <cfreturn execute(uri, true) />
+ <cfreturn execute(uri, false) />
# Posted By Pedro Claudio | 5/8/09 12:42 AM
Thanks Pedro!
# Posted By Bob Silverberg | 5/8/09 7:18 AM