Google Reader Homepage Module

The combination of Google's Reader API and the Google Homepage API (and some fun with reverse engineering the bits Niall didn't work out) gives the IG Reader Module:

IG Reader Module Screenshot

Using the Reader API from the Google homepage is the simplest way of avoiding cross-domain XMLHTTPRequest issues – which in this case are complicated by the fact that Google Reader checks google.com cookies. This means that the reader module needs to be run as an inline module (since non-inline modules are served from a different domain).

The other problem I had was determining the Google Reader _USER_ID value which is required in the API calls. In the end I had to do a XMLHTTPRequest to http://www.google.com/reader/lens/ and parse the response. I also used the same technique to find the _COMMAND_TOKEN which is required to mark items as read.

There are still a few known bugs to fix before I submit it to Google for inclusion in their directory.
Firstly, there are some display issues in IE and secondly the “mark as read” functionality gets confused sometimes (updated: fixed, I think. update 2: Now works in IE). Patches are welcome!!

To install (if you'd like to alpha test it):

  1. You need to be a Google Reader user (or at least have an account)
  2. Sign into Google IG
  3. Install the IG Developer module as described in http://www.google.com/apis/homepage/guide.html#Dev_Module
  4. Add the module http://www.mackmo.com/ig/reader/1.0/reader.xml
  5. Check the box that says “Inlined”
  6. Note that you can change the sort order, the number of items displayed and if reading it via the module marks it as read in Reader by using the “edit” link in the header.

If you like it or have some ideas (or patches!) send me a note: nlothian at apache.org

10 Feb 2006: Updated

Leave a Reply

Your email address will not be published. Required fields are marked *