Sharable $user feeds
September 28th, 2007 | Published in Google App Engine
GME has always supported several permission settings for the application feed -- "No access," "Read-only," "Read and Write All," and, more recently, "Read All and Write Own Entries," which permits users to edit or delete only those entries they have created. The user feed, in contrast, was private, accessible to its owner only. Recently we've released added functionality in GME that enables developers to designate the user feed as publicly readable, ushering in a host of exciting new mashup possibilities.
Enabling public read access for the user feed is easy: after publishing your application, select the Published Apps tab and select the "Read-only" permission setting for public users under the "Feed Permissions" heading. To display a user feed listing in your application, set a gm:list's data source to the following:
Enabling public read access for the user feed is easy: after publishing your application, select the Published Apps tab and select the "Read-only" permission setting for public users under the "Feed Permissions" heading. To display a user feed listing in your application, set a gm:list's data source to the following:
${user}:()/_NAME>
above is the email address (Google Account, technically) of the user whose feed information you are trying to access.
, meanwhile, is the name of the user feed stripe that contains the desired information. For example, say your application includes a form input with id attribute "userEmail" for entering another user's Google Account name. Given this, you can set a gm:list's data source to that user's 'projects' stripe using the following JavaScript function:
function setListSource() {
var myList = google.mashups.getObjectById('myList');
var userEmail = document.getElementById('userEmail').value;
myList.setData('${user}:(' + userEmail + ')/projects');
}
User feeds can also be accessed at the following URL:
.googlemashups.com/feeds/public/user//
We recommend that you inform your users that you will be sharing their data with other users that know their email address and type it into the interface.
At least a couple of cool applications have already been built that make use of this feature including MultiTask (a shared task list) and one of my personal favorites, My Travel Map, which lets you enter your own travels and view the travels of friends. What cool new possibilities can you think up?