_____  

From: Olivia Gannon [mailto:[EMAIL PROTECTED] 
Sent: 16 January 2008 18:00
To: 'Chak Nanga'
Subject: RE: Shindig Gadget server

 

Hi Chak,

 

Still no luck!  Below is a gadget I have created which I have hosted on
orkut container

 

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Data API Howto - ReadWrite Example">
<Require feature="opensocial-samplecontainer" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<script type="text/javascript">

_IG_RegisterOnloadHandler(request);

var sampleData = "Sample storage data!";
var html = "";

function request() {
var req = opensocial.newDataRequest();
req.add(req.newUpdatePersonAppDataRequest(opensocial.DataRequest.PersonId.VI
EWER, "datakey", sampleData), "status");
req.send(response);
}

function response(data) {
var error = data.get("status").hadError();
if (error) {
html = "Error on update person data request.";
} else {
html = "Update person data request successful.";
fetchStoredData();
}
document.getElementById("main").innerHTML = html;
} 

function fetchStoredData() {
var fields = [ "datakey" ]; 
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),
"viewer"); //Needed to get the viewer's ID
req.add(req.newFetchPersonAppDataRequest(opensocial.DataRequest.PersonId.VIE
WER, fields), "returnData");
req.send(showData);
}

function showData(returnData) {
var viewer = returnData.get("viewer").getData();
var viewer_data = returnData.get("returnData").getData()[viewer.getId()];
//Here's why we needed to fetch the viewer
html += "<br/>Person data fetch successful.";
html += "<br/> -->Retrieved data: '" + viewer_data["datakey"] + "' from
viewer: " + viewer.getId();
document.getElementById("main").innerHTML = html;
}

</script>
<div id="main"/>
]]>
</Content>
</Module>

 

Unfortunately I am still unable to view gadget on shindig gadget server.

 

Any ideas?

 

Thanks!

 

  _____  

From: Chak Nanga [mailto:[EMAIL PROTECTED] 
Sent: 16 January 2008 16:19
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: Re: Shindig Gadget server

 

Hi Olivia,

 

The following line in your gadget code is what's causing the
UNSUPPORTED_FEATURE error:

 

<Require feature="opensocial-0.5"/>

 

The Shindig gadget server does not have support for this feature in its
current state.

 

You may want to try the following:

 

1. Change the <Require feature="opensocial-0.5"/> to 

<Require feature="opensocial-samplecontainer"/>

 

This will enable you to run your gadget inside the sample container with
some preloaded stock state data

 

2. Load the samplecontainer.html file by pointing your browser to:

http://localhost:8080/gadgets/samplecontainer/samplecontainer.html 

 

3. Enter http://louiscryan.googlepages.com/LameGame-dev.xml in the text
field in samplecontainer.html and hit the "reset" button (at least that's
what the button was named as of yesterdays code).

 

Chak

 

On Jan 16, 2008 7:14 AM, Olivia Gannon <[EMAIL PROTECTED]> wrote:

Hi,



I have launched shindig gadget server but when I try to launch a gadget e.g.
http://localhost:8080/gadgets/ifr?url=http://louiscryan.googlepages.com/Lame
<http://localhost:8080/gadgets/ifr?url=http://louiscryan.googlepages.com/Lam
eGame-dev.xml>  
Game-dev.xml



I get an error UNSUPPORTED_FEATURE



Am I missing something?? Any ideas??



Thanks!

 

Reply via email to