I tried a very simple gadget and always get an "internalError" for appdata request.
Does anyone know what the problem is? osapi.people.get seems to be working.
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Appdata test"
author_email=""
author="Evgeny Bogdanov">
<Require feature="opensocial-0.9"/>
<Require feature="osapi" />
</ModulePrefs>
<Content type="html" view="default,canvas,home,profile"><![CDATA[
<style type="text/css">
</style>
<button onclick="changeUrl();" >Update</button>
<button onclick="removeUrl();" >Get</button>
<script type="text/javascript">
var changeUrl = function() {
osapi.appdata.update({userId: "@owner", data: {url: "Evgeny"}}).execute(function(res) {
console.log(res)
});
}
var removeUrl = function() {
osapi.appdata.get({userId: "@owner"}).execute(function(res) {
console.log(res)
});
}
</script>
]]></Content>
</Module>