MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

newUpdatePersonAppDataRequest is always returning an error...

Last post 04-19-2008 11:35 PM by Eddie. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 04-17-2008 6:43 PM

    newUpdatePersonAppDataRequest is always returning an error...

    I'm using the AS3 SWC from Flex and trying to save some app data as follows: 

                var dr:MSDataRequest = opensocial.newDataRequest() as MyOpenSpace.MSDataRequest;
                dr.add(dr.newUpdatePersonAppDataRequest('VIEWER', "key","value"));
                dr.send(onUpdateData);

    but this always seems to return an error in the response.  I'm assuming this has something to do with this request using PUT, which apparently Flash does not provide unless you're using a server based proxy...?

    Does this mean I'm SOL if I want to use Flex and the app data store?   Or is there a workaround I can use to make this work?

    Thanks...

    William. 

  • 04-17-2008 7:09 PM In reply to

    • Dave
    • Top 25 Contributor
    • Joined on 02-05-2008
    • Posts 124

    Re: newUpdatePersonAppDataRequest is always returning an error...

    You can implement your own HttpClient using sockets which supports PUT..  I might look in to it tomorrow..

  • 04-18-2008 11:00 AM In reply to

    Re: newUpdatePersonAppDataRequest is always returning an error...

    I take it you're confirming that I'm otherwise SOL...

    Looks like there's a project under way to provide this functionality: 

    http://code.google.com/p/as3httpclientlib/

  • 04-18-2008 11:48 AM In reply to

    • Dave
    • Top 25 Contributor
    • Joined on 02-05-2008
    • Posts 124

    Re: newUpdatePersonAppDataRequest is always returning an error...

    Yer I think we're SOL.  I looked at http://code.google.com/p/as3httpclientlib/, but adobe just changed their security restrictions for sockets.. so it needs a pretty specific set of stuff set up in myspace's crossdomain.xml and who knows if we could get that to happen or not.

  • 04-18-2008 3:16 PM In reply to

    • Dave
    • Top 25 Contributor
    • Joined on 02-05-2008
    • Posts 124

    Re: newUpdatePersonAppDataRequest is always returning an error...

    Check out the new AS3 library, it supports newUpdatePersonAppDataRequest using POST!!  :)  It works great.
  • 04-18-2008 5:28 PM In reply to

    Re: newUpdatePersonAppDataRequest is always returning an error...

    Hell yeah!  Just tried it out now - sweet!  Cool

  • 04-19-2008 11:35 PM In reply to

    Re: newUpdatePersonAppDataRequest is always returning an error...

    So far I've tried to avoid learning all this opensocial speak/language and all those classes in the lib hurt my head as I try to follow it all through. I think I almost made it back to the actual call but lost track of whatever was passed through.

    If somebody could post a Flash code example for newUpdatePersonAppDataRequest so I can follow it through / test it, I would appreciate it.

    Better still if someone has it working outside the lib for either AS2 or AS3 that would be great.

    All I want to do is store some color variables so the user can customise the app's background and text.  

    Thanks

    Eddie 

     

Page 1 of 1 (7 items)