1. Clicking on those requires a www.fegmail.com username and password( dont know if its supposed to be that way or not)
2. After looking at the source of teachers pet it still does not explain what I am asking about.
var req = opensocial.newDataRequest();
req.add(req.newUpdatePersonAppDataRequest("VIEWER", "pet1", tempPet));
req.add(req.newUpdatePersonAppDataRequest("VIEWER", "pet2", p1));
req.add(req.newUpdatePersonAppDataRequest("VIEWER", "pet3", p2));
req.add(req.newUpdatePersonAppDataRequest("VIEWER", "pet4", p3));
req.add(req.newUpdatePersonAppDataRequest("VIEWER", "pet5", p4));
req.send();
}
Is the code used in the teachers pet canvas soucre to add data
it seems to work. However when I try to replicate that with:
var req = opensocial.newDataRequest();
req.add(
req.newUpdatePersonAppDataRequest("VIEWER", "myKey", "myValue"),"set_data");
req.send(set_callback);
function set_callback(response) {
if (response.get("set_data").hadError()) {
/* The update failed ... insert code to handle the error */
document.write("failed");
} else {
/* The update was successful ... continue execution */
Document.write("completed");
}
};
that does nothing.