global_viewer.isOwner is a reference to the JavaScript function object
-- you're not actually executing the function here, just verifying
that it's defined.

Try this instead:

function onLoadViewer(data){
  global_viewer = data.get('viewer').getData();

  if(global_viewer.isOwner())
    ...
  else
    ...
}

Cheers!
- Jason

On May 12, 11:17 am, Julian Andrade <[EMAIL PROTECTED]> wrote:
> this is my code:
> function loadViewer(data){
>           var req = opensocial.newDataRequest();
>           req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
>           req.send(onLoadViewer);
>
> }
>
> var global_viewer = {};
> function onLoadViewer(data){
>           global_viewer = data.get('viewer').getData();
>
>           if(global_viewer.isOwner)
>             alert('viewer in his own app');
>           else
>             alert('viewer in some other app');
>
> }
>
> when i look the app that belongs to other person its returning true, i
> believe that in this case it should return false. am i right?
--~--~---------~--~----~------------~-------~--~----~
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