Migrating OpenSocial v0.7 gadgets to v0.8

Ana Lindstrom-Tamer developed many of the OpenSocial Gadgets that we include in Project SocialSite so she knows a thing or two about OpenSocial. Yesterday she started writing about her experiences migrating gadgets from OpenSocial v0.7 to OpenSocial v0.8 and some of the gotchas she encountered.

Comments:

Hii
i have a query regarding gadgets
previously i had old PHP shindig and i had a gadget called Listfriends.xml (that gadget will display all the friends of owner of profile).

this gadget was working absoultely fine on OLD PHP shindig
but when i deployed latest shindig and i tried to run that gadget which is implemented on opensocial0.7 , is giving error.

Listfriends.xml
-------------------------

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="List Friends Example">
<Require feature="opensocial-0.7"/>
</ModulePrefs>
<Content type="html">

<![CDATA[

<script type="text/javascript">

function getData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER), 'viewer');
req.add(req.newFetchPeopleRequest(opensocial.DataRequest.PersonId.VIEWER_FRIENDS), 'viewerFriends');
req.send(onLoadFriends);
};

function onLoadFriends(dataResponse) {
var viewer = dataResponse.get('viewer').getData();
var html = 'Friends of ' + viewer.getDisplayName();
html += ':<br><ul>';
var viewerFriends = dataResponse.get('viewerFriends').getData();
viewerFriends.each(function(person) {
html += '<li>' + person.getDisplayName() + '</li>';
});
html += '</ul>';
document.getElementById('message').innerHTML = html;
};

gadgets.util.registerOnLoadHandler(getData);

</script>
<div id="message"> </div>
]]>
</Content>
</Module>
--------------------------------------------------

if u have any idea just let me know.

Thanx for ur support and time
Cheers
Anand

Posted by Anand on August 18, 2008 at 06:54 PM EDT #

I don't see anything obvious. The Shindig User mailing list (http://incubator.apache.org/shindig/#tab-support) is probably the best forum to get that question answered. Make sure you send in the error messages you receive, otherwise we'll have no way to tell what's going wrong.

- Dave

Posted by Dave Johnson on August 19, 2008 at 03:00 AM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow this blog for news and notes about Social Networking, Social Software, trends and information about Sun's new Project SocialSite.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today