Hey all, here at MySpace we’ve come across an issue with opensocial.requestSendMessage, so I’d like to propose a change to it for the 0.8 spec.
The spec calls for “recipients” to be passed in, which is essentially an idSpec. When we display the popup dialog we don’t do any server action until the user hits the “send” button. So what we actually want is an opensocial.Person object passed up, which, according to spec, must contain the ID, image and URL. That’s enough for us to populate the UI without hitting the server for that information.
This seems a natural way of doing things, I imagine a common use-case of: fetching the viewer’s friends when the app loads, displaying a “friend picker”, attaching each friend to the corresponding opensocial.Person object, then when clicked initiate a requestSendMessage and pass in the Person. If you have the ID of a friend, then I think you must have the Person object, correct? Is there another way for an app to know my friend’s IDs beyond a newFetchPeopleRequest -- which returns opensocial.Person objects, or possibly persisting the social graph?
Currently we are forced to have requestSendMessage go fetch the person object given the ID, and in the callback show the popup UI. This is pretty ugly, especially considering that to get that ID we have already probably made a newFetchPeopleRequest.
So my proposal is to allow both IDs and Person objects to be passed up into requestSendMessage, as I’m sure I just missed the use case where an app has the ID but not the Person, but it’d really work well for us to allow both.
Any thoughts?
Thanks,
Chad Russell
Sure… we’ve been following the philosophy that no one will want to use the “destroy my relationship” app described below, and they’ll uninstall it, and it will never be successful. We exposed this functionality on MySpace weeks ago and have had no problems.
Chad