MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Passing Arguments to "Add Application"

Last post 07-04-2008 3:52 PM by $cott. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-28-2008 11:29 PM

    • Don
    • Not Ranked
    • Joined on 06-06-2008
    • Posts 4

    Passing Arguments to "Add Application"

    Is there any way possible to pass arguments to the add application page in the query params that will persist as the user enters the application after adding?

    What I am trying to do is have an already logged in user from my site link to MySpace, add the application, and when they are redirected to the application canvas, have the ability to know which user they are based on the user id I have specified in the param.

    Is there a better way to do this than what I have in mind? I have not seen any way to persist a user's experience from my site through to a MySpace app this way yet.

  • 06-29-2008 11:33 AM In reply to

    Re: Passing Arguments to "Add Application"

    Basically what you're saying is you want to be able to have a user who is logged into your site be able to click a link to the "add application" page for your app, add the app, and based on params from your site the app will know who the user is that added?

     As far as I know, there is not. What you can do is just have the user log in once the app is started using the same credentials as are used on the site. Then you would just pass that to your site, check the credentials and then send back the users content or do whatever.

     Having the user log in again is also a lot more secure. If one of your users left the page open with the link to the myspace app, any person who came along could represent their myspace to your site as the users myspace, and access their stuff. 

  • 07-04-2008 3:52 PM In reply to

    Re: Passing Arguments to "Add Application"

     If the App Data API were working you would have a way, albiet an easily reverse  engineered way.  I could suggest an alternative, however, that should work.  When you create your application you are given a chance to provide a registration and unregistration url.  It is here where you want to do your work.  You can also provide request parameters on the query string, i.e. http://www.myapphome.com/appregister/install.php?appid=4edfaa76348abbaa7845df.  This would be useful if you manage multiple applications from one service.  There is lots of handy information passed along with that request that you can use to make sure a user is authentic.  That same information is available to you when you use makeRequest, which can be used to authenticate a user as well. I suggest you obfuscate as much as possible the urls that you call for authentication since those can be easily read from the source.  I've already got a working prototype that is driven by web services and talks to a sql backend to store application registration information.  I also have a name/value pair storage service that allows me to get around the fact that the App Data API seems broken or incomplete.  It's difficult, but not impossible to get what you want done.  Unfortunately you have to "role your own" for a lot of it, which is the case for just about all the OpenSocial containers I've seen as far as third party application support is concerned, so par for course.  Good luck and if you want to collaborate drop me a line.

Page 1 of 1 (3 items)