From rukapedia
Jump to: navigation, search

What is PresenceRouter?

A tentative project to build an OS X desktop client that will let me route my presence information -- from Plazes and elsewhere -- to different web sites and services.

The application works by obtaining current status information from Plazes using the nascent Plazes API, and then using the APIs of the various webservices to update them with a message like watching the hockey game at Steve's House in Montreal, Canada.


You can always grab the latest version of PresenceRouter from the download page. Once you have it installed you can, at your option, set it to auto-update so you'll automatically be notified of subsequent releases.

Screen Shot

The PresenceRouter UI is very simple right now: just a console window that provides information on what the application is doing:


Technical Details

PresenceRouter is coded in AppleScript using AppleScript Studio. Which is rather delightful to work with once you get over all the "tell object text view fred of scroll view bob of window julie" verbosity. The only real limitation is that it cannot, by virtue of this, be a multi-threaded application, the primarily manifestation of which is that the Preferences cannot be updated while a presence update is in progress.

Web Services Supported


API Documentation


  • personal_key (get from
  • method = message (140 character limit)
  • location = location string as Neighbourhood, City, Country (optional)


API Documentation


  • status (160 character hard limit; 140 characters recommended)

Use HTTP Basic Authentication, passing regular Twitter username and password.


API Documentation


  • email - Your account's email address.
  • password - Your account's password.
  • type - The post type
    • link looks like the best type
      • name (optional)
      • url
      • description (optional, HTML allowed)
  • generator (optional) - A short description of the application making the request for tracking and statistics, such as "John's Widget 1.0". Must be 64 or fewer characters.


API Documentation


API Documentation


API Documentation


No external methods currently supported for status message update, but see this handy hack for a way of doing this through the mobile method.

Example of the HTML that needs to be parsed to grab the "post_form_id" are:


an existing presence message:
name="post_form_id" value="bbbeb01a1abceb828a31a5208840bfdd" />
Peter is short diversion to release updated PresenceRouter at Reinvented Office in Charlottetown, PE, Canada. 
<small>(1m ago)</small>

Without an existing presence message:

name="post_form_id" value="3ee270e046ec1ec8a709324ea4c17598" />
Keep your friends up to date on your current status.<br />
<small>Tijs is:</small><br /><input type="text" name="status" size="10" /><br />
<input type="submit" name="update" value="Update" class="button" /></form></div>

The original PHP code to parse out the post_form_id was:

preg_match('/name="post_form_id" value="(.*)" \/>'.ucfirst($first_name).'/', $page, $form_id);

Local Applications Supported


See this code as a starting point (uses ye olde Plazes).