<?xml version="1.0" encoding="UTF-8"?>
<Module>
  <ModulePrefs title="Song List">
I had the profile code working with os:HttpRequest call in sandbox few
weeks back and noticed today that its broken. I could not figure out
why its broken (JSON content would not render), so tried the example
provided by orkut but I am not able to get the JSON content render
with their code as well.

I would greatly appreciate if anyone can provide pointers on how to
make this work.

Thanks,
Paresh

Here is how the application XML looks like:

    <Require feature="opensocial-data" />
    <Require feature="opensocial-templates">
      <Param name="process-on-server">true</Param>
    </Require>
  </ModulePrefs>
  <Content type="html">
    <![CDATA[
      <script type="text/os-data" xmlns:os="http://ns.opensocial.org/
2008/markup">
        <os:HttpRequest key="song" href="http://www.vastunetwork.com/
orkut_profile.php"/>
      </script>

      </script>
      <script type="text/os-template" require="song">
        Test
        <a href="${song.url}">
        <img src="${song.albumThumbnail}"/>
        ${song.title} BY ${song.artist} FROM ALBUM ${song.album}
        </a>
      </script>
    ]]>
  </Content>
</Module>

The JSON structure looks like:

{songs : [ { title: 'Love song #15', url: 'http://allmusic.com/johndoe/
greatesthits/lovesong15.mp3', artist: 'John Doe', album: 'Greatest
Hits', albumThumbnail: 'http://allmusic.com/johndoe/
greatesthits.jpg' }, { title: 'Love song #16', url: 'http://
allmusic.com/janedoe/greatesthits/lovesong16.mp3', artist: 'Jane Doe',
album: 'Best Of', albumThumbnail: 'http://allmusic.com/janedoe/
bestof.jpg' }, { title: 'Single #1', url: 'http://allmusic.com/janedoe/
greatesthits/single1.mp3', artist: 'Jane Doe', album: 'Greatest Hits',
albumThumbnail: 'http://allmusic.com/janedoe/greatesthits.jpg' }, ]}


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to