Okey will try that as well ... just for knowledge if my app is large and a lot of thing are loading .... does that hamper the asynchronous request reply that orkut is sending me. Because specifically my app fails to enter the loop viewerFriends.each(function(person). I checked with alerts.
On Thu, Aug 6, 2009 at 12:59 PM, Sachin Shenoy<therealsac...@gmail.com> wrote: > Ok. I will have a look at this, but meanwhile can you try with > opensocial-0.8 rather than 0.7 if that solves your problem. > > Sachin > > On Wed, Aug 5, 2009 at 11:27 PM, Shikhar Sachan <shikhar.sac...@gmail.com> > wrote: >> >> Sir, >> Actually I am only testing and this is the app. >> It sometimes works and sometimes doesn't. To be more specific - it >> works at night and not when I am in office. I am unable to guess the >> problem. Why is it happening. As far as I know internet >> connections are all right at both the places >> >> <?xml version="1.0" encoding="UTF-8" ?> >> <Module> >> <ModulePrefs title="Hello World"> >> <Require feature="opensocial-0.7" /> >> <Require feature="dynamic-height"/> >> <Require feature="opensocial-data"/> >> <Require feature="opensocial-templates"> >> <Param name="process-on-server">true</Param> >> </Require> >> </ModulePrefs> >> >> <Content type="html" view="canvas"> >> <![CDATA[ >> >> <script type="text/javascript"> >> function loadFriends() { >> var params = {}; >> var fieldz = >> [opensocial.Person.Field.ID,opensocial.Person.Field.THUMBNAIL_URL]; >> params[opensocial.DataRequest.PeopleRequestFields.MAX] = 10000; >> params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = >> fieldz; >> var req = opensocial.newDataRequest(); >> req.add(req.newFetchPersonRequest('VIEWER'), 'viewer'); >> req.add(req.newFetchPeopleRequest('VIEWER_FRIENDS',params), >> 'viewerFriends'); >> req.add(req.newFetchPersonAppDataRequest('VIEWER', 'gifts'), 'data'); >> req.add(req.newFetchPersonAppDataRequest('VIEWER_FRIENDS', 'gifts'), >> 'viewerFriendData'); >> req.send(onLoadFriends); >> } >> >> function onLoadFriends(data) { >> var viewer = globalViewer = data.get('viewer').getData(); >> var viewerFriends = data.get('viewerFriends').getData(); >> var giftData = data.get('data').getData(); >> var viewerFriendData = data.get('viewerFriendData').getData(); >> var friends = new Array(); >> >> html2=new Array(); >> html2.push('<select id="person">'); >> var i = 0; >> viewerFriends.each(function(person) { >> html2.push('<option value="' + person.getId() + '">' + >> person.getDisplayName() + "</option>"); >> i=i+1; >> }); >> >> html2.push('</select>'); >> document.getElementById('dom_handle').innerHTML = html2.join(''); >> >> } >> >> function init() { >> loadFriends(); >> } >> gadgets.util.registerOnLoadHandler(init); >> </script> >> >> <div id="dom_handle"></div> >> >> ]]> >> </Content> >> >> </Module> >> >> >> On Wed, Aug 5, 2009 at 2:29 PM, Sachin Shenoy<therealsac...@gmail.com> >> wrote: >> > Hi Shikhar, >> > >> > Can you send me the appId / appUrl? >> > >> > Thanks, >> > Sachin >> > >> > >> > On Wed, Aug 5, 2009 at 1:35 AM, Shikhar Sachan >> > <shikhar.sac...@gmail.com> >> > wrote: >> >> >> >> Also another thing as per V 7 specification it accepts literals. Also >> >> I see that my app is working sometimes and not working the other ... >> >> I have no clue. >> >> Any help will be appreciated >> >> Shikhar >> >> >> >> On Wed, Aug 5, 2009 at 12:48 PM, Shikhar >> >> Sachan<shikhar.sac...@gmail.com> >> >> wrote: >> >> > respected sachin >> >> > >> >> > so what is the idSpec of VIEWER/VIEWER_FRINDS. It would be really >> >> > helpful if you redefine the function call with idSpec. >> >> > Also the code is working in Orkut OpenSocial Dev App so i guess it >> >> > accepts literals. >> >> > >> >> > >> >> > thanks a tonn >> >> > >> >> > On Wed, Aug 5, 2009 at 1:06 AM, Sachin >> >> > Shenoy<therealsac...@gmail.com> >> >> > wrote: >> >> >> newFetchPeopleRequest and newFetchPersonAppDataRequest takes IdSpec >> >> >> and >> >> >> not >> >> >> string literals, as first argument. >> >> >> >> >> >> >> >> >> http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/OpenSocial-Specification.html#opensocial.DataRequest.newFetchPersonAppDataRequest >> >> >> Regards, >> >> >> Sachin >> >> >> >> >> >> On Tue, Aug 4, 2009 at 1:55 PM, Shikhar Sachan >> >> >> <shikhar.sac...@gmail.com> >> >> >> wrote: >> >> >>> >> >> >>> Hello Developers, >> >> >>> >> >> >>> The following code is working and giving me my friend list on Open >> >> >>> Social Dev App(orkut) [the platform to test codes]. However when >> >> >>> trying on Sandbox the alert("here2") doesn't work. i.e. the code >> >> >>> doesn't enter the loop in function onLoadFriends() >> >> >>> Any clues. Would highly appreciate. >> >> >>> >> >> >>> thanks a tonn >> >> >>> Shikhar Sachan >> >> >>> >> >> >>> >> >> >>> function loadFriends() { >> >> >>> var params = {}; >> >> >>> var fieldz = >> >> >>> [opensocial.Person.Field.ID,opensocial.Person.Field.THUMBNAIL_URL]; >> >> >>> params[opensocial.DataRequest.PeopleRequestFields.MAX] = 10000; >> >> >>> params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] >> >> >>> = >> >> >>> fieldz; >> >> >>> var req = opensocial.newDataRequest(); >> >> >>> req.add(req.newFetchPersonRequest('VIEWER'), 'viewer'); >> >> >>> req.add(req.newFetchPeopleRequest('VIEWER_FRIENDS',params), >> >> >>> 'viewerFriends'); >> >> >>> req.add(req.newFetchPersonAppDataRequest('VIEWER', 'gifts'), >> >> >>> 'data'); >> >> >>> req.add(req.newFetchPersonAppDataRequest('VIEWER_FRIENDS', >> >> >>> 'gifts'), >> >> >>> 'viewerFriendData'); >> >> >>> req.send(onLoadFriends); >> >> >>> } >> >> >>> >> >> >>> function onLoadFriends(data) { >> >> >>> var viewer = globalViewer = data.get('viewer').getData(); >> >> >>> var viewerFriends = data.get('viewerFriends').getData(); >> >> >>> var giftData = data.get('data').getData(); >> >> >>> var viewerFriendData = data.get('viewerFriendData').getData(); >> >> >>> var friends = new Array(); >> >> >>> >> >> >>> html2=new Array(); >> >> >>> html2.push('<select id="person">'); >> >> >>> var i = 0; >> >> >>> alert('here1'); >> >> >>> viewerFriends.each(function(person) { >> >> >>> alert('here2'); >> >> >>> html2.push('<option value="' + person.getId() + '">' + >> >> >>> person.getDisplayName() + "</option>"); >> >> >>> i=i+1; >> >> >>> }); >> >> >>> >> >> >>> html2.push('</select>'); >> >> >>> document.getElementById('dom_handle').innerHTML = html2.join(''); >> >> >>> } >> >> >>> >> >> >>> loadFriends(); >> >> >>> >> >> >>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >> >> > >> > >> > > >> > >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ 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-orkut@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 -~----------~----~----~----~------~----~------~--~---