I think you are getting the error, because you didnt define a return-data key for your update, see:
function saveData(key, value) { var req = opensocial.newDataRequest(); req.add(req.newUpdatePersonAppDataRequest("VIEWER", key, value),"setdata"); req.send(callbackData); } function callbackData(data) { if (data.get("setdata").hadError()) { alert("couldnt save data"); } } Try in this way and let me know how it goes. Regards Robson Dantas 2010/8/3 <k...@ukr.net> > Always output "error: undefined". What is I do wrong? > > function saveViewerPersistence(key,value){ > var req = opensocial.newDataRequest(); > req.add(req.newUpdatePersonAppDataRequest("VIEWER", key, value)); > req.send(checkSend); > } > > function checkSend(data){ > if (data.hadError()){ > output("error: "+data.getErrorMessage()); > } else { > output("data saved") > } > } > > cls(); > saveViewerPersistence("key",456); > > -- > You received this message because you are subscribed to the Google Groups > "orkut Developer Forum" group. > To post to this group, send email to opensocial-or...@googlegroups.com. > To unsubscribe from this group, send email to > opensocial-orkut+unsubscr...@googlegroups.com<opensocial-orkut%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/opensocial-orkut?hl=en. > -- You received this message because you are subscribed to the Google Groups "orkut Developer Forum" group. To post to this group, send email to opensocial-or...@googlegroups.com. To unsubscribe from this group, send email to opensocial-orkut+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en.