3 Replies - 6801 Views - Last Post: 16 March 2011 - 03:12 PM Rate Topic: -----

#1 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1912
  • View blog
  • Posts: 3,447
  • Joined: 13-January 08

API Tips/Tricks

Post icon  Posted 15 March 2011 - 08:42 AM

I've been struggling recently with some issues I'm having with a site I'm running on an OpenBD box. The issues primarily involve integration of third party APIs and building and consuming web services using CFML.

Like for instance, I'm discovering that some old code I'd written to use the Twitter API is now obsolete as Twitter has changed their API to use OAuth (as opposed to the option of logging in via a Base64 REST request). Once I've slain this dragon, I get to move on to the Facebook API and update some of the code I built long ago to use the Google Maps API. Just the other day, I managed to defeat the Amazon S3 API and bend it to my will (somewhat).

Anyway, once I'm done with those I'll probably blog it and post up here for a quick "how to" so folks can hopefully avoid stepping into the holes I'm discovering the hard way. Some of my discoveries may be OpenBD specific but I also work with CF9 daily and I know the pain from trying to understand API documentation that wasn't written with a CF dev in mind.

I'd like to invite anyone who has done battle with a particularly tricky API (or not tricky, it doesn't matter) to post their experiences here and perhaps describe how they got around (or through) their problem.

Is This A Good Question/Topic? 1
  • +

Replies To: API Tips/Tricks

#2 xheartonfire43x  Icon User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 454
  • Joined: 22-December 08

Re: API Tips/Tricks

Posted 16 March 2011 - 10:01 AM

In my experience with API's (which aren't many) I usually just grab a wrapper from RIAForge. They have most API wrappers. Generally developers are able to change the wrapper code for updated API's without changing the method names so TwitterAPI.login() will still be TwitterAPI.login() when you update. Matt Gifford wrote a really good Twitter wrapper (which I am unable to grab the link for right now) thats called something like MonkehTweets.
Was This Post Helpful? 0
  • +
  • -

#3 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1912
  • View blog
  • Posts: 3,447
  • Joined: 13-January 08

Re: API Tips/Tricks

Posted 16 March 2011 - 11:04 AM

Right and that's fine. I too normally look for what someone has already done before I go and try to brew my own. That said, one of the Twitter API solutions found on RIAForge started out with good comments...and then degenerated into "this ain't workin'" posts...right around the time Twitter changed the authentication protocol.

However, while I used Twitter as the example, I was curious to see what others have built themselves for API integrations into CF is all.
Was This Post Helpful? 0
  • +
  • -

#4 CR250  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 58
  • Joined: 14-June 08

Re: API Tips/Tricks

Posted 16 March 2011 - 03:12 PM

View PostCraig328, on 15 March 2011 - 08:42 AM, said:

... Twitter API is now obsolete as Twitter has changed their API to use OAuth (as opposed to the option of logging in via a Base64 REST request).


I also had to deal with this for a Twitter app. I went with http://twitter4j.org/en/index.html It was amazingly easy to use. I have used this with Railo however but it will work fine with OpenBD
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1