Hi Shikhar, Can you send me the appId / appUrl?
Thanks, Sachin On Wed, Aug 5, 2009 at 1:35 AM, Shikhar Sachan <[email protected]>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<[email protected]> > 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<[email protected]> > 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 < > [email protected]> > >> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---

