Hi Victor. Since you're building an OpenSocial v0.8 app, you'll need
to use opensocial.IdSpec.PersonId.OWNER instead. You will also need to
include the following line in your ModulePrefs element in order to use
the adjustHeight method:

<Require feature="dynamic-height"/>

Two more points:
1. Make sure you're running this sample in the sandbox since
prod.sandbox and production orkut don't currently support OpenSocial
v0.8.
2. In general, <a href='javascript:void(0);" ...> is better than <a
href="#" ...> since the latter actually removes the security token
which prevents other OpenSocial calls from working.

Welcome to orkut development! Let me know if you have any more
questions.

- Jason

On Oct 6, 12:22 pm, Victor Bursztyn <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm fairly new to the OpenSocial API, so I guess my question is a
> really basic one.
> This is my first step ahead from displaying a "hello world" in the app
> canvas, which was my first test ever. The code is right bellow and
> only prints the "Owner's name:" anchor and the "The name should apper
> in here" label.
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <Module>
>   <ModulePrefs title="Hello World!">
>     <Require feature="opensocial-0.8" />
>   </ModulePrefs>
>   <Content type="html">
>     <![CDATA[
>       <script type="text/javascript">
>       function response(data) {
>         html = new Array();
>         html.push('<b>', data.get("req").getData().getDisplayName(), '</b>')
>         document.getElementById('AppContent').innerHTML = html.join('');
>         gadgets.window.adjustHeight();
>       };
>       function request() {
>         var req = opensocial.newDataRequest();
>
> req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),
> "req");
>         req.send(response);
>       };
>       </script>
>       <a href="#" onclick="request(); return false;">Owner's name:</a>
>       <br>
>       <div id="AppContent">The name should apper in here</div>
>     ]]>
>   </Content>
> </Module>
>
> What am I missing?
>
> Thanks for your time,
> Victor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
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