John McCollum

Using JSON to access the Twitter search API

Steve Reynolds recently wrote a blog post showing how to access the twitter search API using PHP, cURL, and JQuery.

Steve used JQuery to post to a page on his server, which then cURLed in search results for a given term. This approach is often necessary to get avoid the issue of cross domain ajax calls.

While this approach works well, there’s an even easier way to go about it – $.getJSON!

There are two main advantages to this approach:

  • Server side technology isn’t an issue. You don’t have to rely on PHP, cURL, firewalls, anything like that. It will even work on a static HTML page!
  • All the work is done on the client’s browser – saving precious bandwidth! This could be important on busy sites.

I’ve knocked up a quick-and-dirty demonstration of this concept. If a name doesn’t already exist for this methodology, my vote goes for JAJA (Javascript and JSON, asynchronous!)

View the demonstration here!

Posted in AJAX, jquery, web development at February 7th, 2009. 11 Comments.

I’m a twit!

I’ve never got round to checking out Twitter, to my great shame!

I already have profiles on Facebook, Bebo, and other social networking sites – many of which allow a quick method of updating your status. So why bother with Twitter now?

  • Update by mobile (just need to charge my mobile now :) )
  • Easy integration into my blog

Unfortunately, Twitter doesn’t seem to want to check any of my email addresses for friends at the moment, so I am following: no-one. And I am being followed by: no-one.

You can rectify this by coming to see me at http://twitter.com/johnmcc!

Posted in Social Media at August 4th, 2008. 1 Comment.

Twitter Reddit Flickr LinkedIn Stack Overflow Github Email Ne RSS