A bit of a followup.   I just added this simple add to my sandbox to
test the basic request functionality.   It ran first time just fine,
then subsequently I re-added the same app and now am getting the same
javascript error as above!   Now, I can't get it to work no matter how
hard I try.

This appears to be some kind of environment issue..

Here's the app:

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world example">
<Require feature="opensocial-0.7"/>
</ModulePrefs>


<Content type="html"><![CDATA[
<div id='main'>
<div id='test'> </div>
</div>
<script>
function setRequest() {
var data = {
html : "USER Input"


}


var req = opensocial.newDataRequest();
req.add(req.newUpdatePersonAppDataRequest(
opensocial.DataRequest.PersonId.VIEWER,
"test",
gadgets.json.stringify(data)),
"setData");
req.send(getRequest);


}


function getRequest() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(
opensocial.DataRequest.PersonId.VIEWER),
"getViewer");
req.add(req.newFetchPersonAppDataRequest(
opensocial.DataRequest.PersonId.VIEWER,
"test"),
"getData");
req.send(getResponse);

}


function getResponse(data) {
var viewer = data.get("getViewer").getData();
var testData = data.get("getData").getData()[viewer.getId()]["test"];

var unescapedTestData = gadgets.util.unescapeString(testData);
var testObject = gadgets.json.parse(unescapedTestData);

document.getElementById("test").innerHTML = testObject.html;


}


</script>
<script>
gadgets.util.registerOnLoadHandler(setRequest);
</script>
]]></Content>
</Module>


On May 19, 1:05 pm, kennyjay <[EMAIL PROTECTED]> wrote:
> Hi All
>
> I'm just diving into Orkut development and I'm just trying to get a
> basic datarequest working and adding just this line causes a
> javascript error to be thrown at runtime:
>
> var req = opensocial.newDataRequest();
>
> It refers to line 359 which is the generated code:
>
> opensocial.newDataRequest=function(){return
> opensocial.Container.get().newDataRequest()
>
> };
>
> Am I missing something real basic like a "Require Feature" parameter?
>
> Thanks!
>
> Ken
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to