Hi, There's a proposed addition to the API that adds a new call:
urlTo(mode,params) Here's the hack code we have in hi5container.js: opensocial.Hi5Container.prototype.urlTo = function(mode, params) { var url; switch(mode) { case opensocial.Hi5Container.Mode.CANVAS : // TODO hack, fix for general case url = "/friend/displayAppCanvas.do?appName=Songs+iLike"; alert(params); alert(params.length); break; case opensocial.Hi5Container.Mode.PROFILE : break; case opensocial.Hi5Container.Mode.PREVIEW : break; }; return url; }; Obviously this needs to be scoped out so that params get passed as well as the installed Application ID. This will allow you to get from the profile page to a canvas page, and maybe even popups... On Wed, Nov 07, 2007 at 03:55:10PM -0000, sanjaymk wrote: > > I think the situation and my experience is far worse. You cant build > an app that does any multipage flows. As soon as you leave the > main page (instantiated by gmodules.com), you get "opensocial > is not defined" errors. Forget multipages, I thought I was being > smart and created a frame pulling content from my site > (mymusik.us). And lost the opensocial context. > > Dont even bother adding your variables to a url and invoking > say sandbox.orkut.com/Application.aspx?appId=...&yourvar=xx > You will get a "Location.toString permission denied" if you > attempt accessing the window.location.search string for > the top level url (or window.top...) The top level url comes > from gmodules.com. Your js doesnt. > > I cant do anything interesting with opensocial till they fix > the contenttype=url flows. > -Sanjay > > On Nov 7, 4:38 am, toxic <[EMAIL PROTECTED]> wrote: > > Tried it already , but cant send Cookies to multiple domains ;-<. > > > > On Nov 7, 2:05 am, MrGamma <[EMAIL PROTECTED]> wrote: > > > > > Can't you dump the variables into cookies? > > > You received this message because you are subscribed to the Google Groups > "OpenSocial Developers" group. > To post to this group, send email to opensocial-api@googlegroups.com > To unsubscribe from this group, send email to [EMAIL PROTECTED] > For more options, visit this group at > http://groups.google.com/group/opensocial-api?hl=en > -~----------~----~----~----~------~----~------~--~--- > -- Paul Lindner hi5 Architect [EMAIL PROTECTED]
pgpKWo3lig7Gd.pgp
Description: PGP signature