Hi, Thanx. It's working. I have one more doubt. When I upload my application in sandbox, I can see it in my application directory of sandbox but not from my user orkut profile nor from my friends profiles. For my application to be visible to all, do I have to register it and get approved?
On Sat, Jan 30, 2010 at 3:00 PM, Dhaval Pancholi <[email protected]>wrote: > Hi Vinoth,Ramya > > I just forgot some functions in the xml > which i gave above. my BAD :) > > > Here Ramya your xml i have done all the changes and made it working. > You can ask me any questions if u r in doubt > > <?xml version="1.0" encoding="UTF-8" ?> > <Module> > <ModulePrefs title="RUMMY" thumbnail="http://u15334027.onlinehome- > server.com/Rummy/gameAssets/bulkcard.png" > screenshot="http://u15334027.onlinehome-server.com/Rummy/gameAssets/ > bulkcard.png" description="A fantastic rummy online game" > author="GOLIVE" author_email="[email protected]" > icon="GAME_FAV_ICON"> > <Locale lang="en"/> > <Require feature="opensocial-0.8"/> > <Require feature="opensocial-data"/> > <Require feature="tabs"/> > <Require feature="opensocial-templates"> > <Param name="process-on-server">true</Param> > </Require> > <Require feature="dynamic-height"/> > <Require feature="views"/> > </ModulePrefs> > > > <Content type="html" view="profile"> > > > <![CDATA[ > > <script type="text/os-template" xmlns:os="http://ns.opensocial.org/ > 2009/extensions"> > <os:NavigateToApp> > <center style="padding:0; margin:0;"><img > src="GAME_PREVIEW_IMAGE_URL" border=0 height="250" style="overflow: > hidden;"/></center> > </os:NavigateToApp> > </script> > ]]> > <!-- > The above code will render you game preview image in the profile view > of the application > --> > </Content> > > <Content type="html" view="canvas"> > > <![CDATA[ > <!-- Load the application-specific css --> > <script type="text/javascript" > > > gadgets.util.registerOnLoadHandler(sendRequest); > > /* gets owner and viewer info */ > function sendRequest() > { > if(gadgets.window) > { > gadgets.window.adjustHeight('800px'); > } > document.getElementById > ('main').innerHTML='Loading...'; > var idspec = opensocial.newIdSpec({'userId' : > 'OWNER', 'groupId' : 'FRIENDS'}); > var idspecviewer = opensocial.newIdSpec > ({'userId' : 'VIEWER', 'groupId' : 'FRIENDS'}); > > var req = opensocial.newDataRequest(); > var owner_params = { }; > owner_params > [opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = > [opensocial.Person.Field.NAME > ,opensocial.Person.Field.GENDER,opensocial.Person.Field.CURRENT_LOCATION, > opensocial.Person.Field.PROFILE_URL]; > > var viewer_params={}; > viewer_params > [opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]= > [opensocial.Person.Field.NAME,opensocial.Person.Field.PROFILE_URL]; > > req.add(req.newFetchPersonRequest > (opensocial.IdSpec.PersonId.OWNER,owner_params),"owner"); > req.add(req.newFetchPersonRequest > (opensocial.IdSpec.PersonId.VIEWER,viewer_params),"viewer"); > > /* get owner friends */ > var friends_params = {}; > friends_params > [opensocial.DataRequest.PeopleRequestFields.MAX] =1000; > req.add(req.newFetchPeopleRequest > (idspec,friends_params),'friends'); > req.add(req.newFetchPeopleRequest > (idspecviewer,friends_params),'friendsviewer'); > req.send(getResponse); > /*end owner friends */ > } > /*end*/ > > function getResponse(data) > { > viewer = data.get("viewer").getData(); > owner = data.get("owner").getData(); > friends = data.get('friends').getData(); > friendsviewer = data.get > ('friendsviewer').getData(); > orkut_owner_pic_url=owner.getField > (opensocial.Person.Field.THUMBNAIL_URL); > > /*get viewer and owner of application*/ > orkut_profile_owner_id = getOrkutId > (owner); > if(viewer != null) > { orkut_profile_viewer_id = getOrkutId (viewer); } > /*end*/ > > /*****************************************set canvas view html > over > here*********************************/ > > document.getElementById('main').innerHTML ='<div > style="padding-bottom:15px;"></div><embed type="application/x- > shockwave-flash" src="http://u15334027.onlinehome-server.com/Rummy/ > SmartRummyGame.swf" width="600" height="500" quality="high" > scale="noscale" salign="LT" wmode="transparent" menu="false" > allowfullscreen="true" allowscriptaccess="true"></embed>'; > > /******************************************end canvas > view**********************************************/ > }//end get response function > > > function getOrkutId(user) > { > var ownerOrkutUid = ''; > var profile_url = ''; > if(user == 'undefined' || user == null ) > { > profile_url = > user.getField(opensocial.Person.Field.PROFILE_URL); > }else > { > profile_url = > user.getField(opensocial.Person.Field.PROFILE_URL); > } > > var regex = /uid=([^&#]+)/; > var result = profile_url.match(regex); > if (result.length == 2) { > ownerOrkutUid = result[1]; > /* uid now contains the viewer's orkut UID */ > } else { > /* there was a problem getting the UID */ > } > return ownerOrkutUid; > }//end orkut id function > > </script> > > <div id="main"></div> > > ]]> > > </Content> > </Module> > > -- > 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]<opensocial-orkut%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/opensocial-orkut?hl=en. > > -- Ramya Kondeti -- 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.

