Hi, my code:

<script xmlns:os="http://ns.opensocial.org/2008/markup"; type="text/os-
data">
<os:HttpRequest key="textoprofile" href="http://myserver.com"/>
</script>
<script type="text/os-template" require="textoprofile">
Carregando ${textoprofile.texto}
</script>

Result http://myserver.com:
{ "texto" : ["text text text text"] }

but in profile page result in blank page.



On Apr 23, 5:47 pm, jdjaramillo <[email protected]> wrote:
> I'm not sure what your error is, but I can show you my working
> code...
>
> <script type="text/os-data" xmlns:os="http://ns.opensocial.org/2008/
> markup">
>         <os:HttpRequestkey="sbets" href="http://soccerbets.mentez.com/
> soccerbets/placar/index.php?vista=GetUser&ouid=${owner.id}" />
> </script>
>
> For example, I can fetch my own info, from 
> here:http://soccerbets.mentez.com/soccerbets/orkut/index.php?vista=GetUser...
>
> And the following works as expected:
>
>   <script type="text/os-template" require="owner, ofriends">
> Palpites: ${sbets.content.apu}   <br />
> Acertos: ${sbets.content.win}
> ...
>   </script>
>
> I guess you can try with ${root.content.root.test}
>
> On Apr 22, 4:44 pm, steiljes <[email protected]> wrote:
>
> > Can someone show me how I need to return the data back from the (PHP)
> > server to my client?
> > I'm trying to render my app on profile view in sandbox and making a
> > simple call like this-
>
> > <script type="text/os-data" xmlns:os="http://ns.opensocial.org/2008/
> > markup">
> >                         <os:HttpRequestformat="json" refreshInterval="1" 
> > key="root"
> > href="............/profiledata2.php?owner=${owner.id}"/>
> > </script>
>
> > <script type="text/os-template"  xmlns:os="http://ns.opensocial.org/
> > 2008/markup" require="root">
> >   Test root = <span>${root.test}</span>
> > </script>
>
> > Then my php file is written like this (simple)-
> > ---------------
> > $v = json_encode(array('root' => array('test'=>1)));
>
> > echo $v;
> > --------------
>
> > My profile then shows up as
> > Test root = <blank>
>
> > It doesn't return '1' as the value which I was expecting.
>
> > TIA.

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