Hi, Robson,

Your code helped me and now the application is working perfectly.

Thank you very much.

Felipe Oliveira.

On Fri, Mar 13, 2009 at 4:43 PM, Felipe Oliveira <ifn...@gmail.com> wrote:

> Hi, Robson,
>
> Thanks, I test now, and reply on finish.
>
> ;P
>
> Felipe Oliveira.
>
>
> On Fri, Mar 13, 2009 at 4:23 PM, Robson Dantas <biu.dan...@gmail.com>wrote:
>
>> Hi Felipe,
>>
>>
>> Hi Felipe.
>>
>> Take a look at this very basic sample. Just go over this..
>>
>> /*
>> Basic setup function
>> */
>> function initSetup()
>> {
>>     var req = opensocial.newDataRequest();
>>     opt_params={};
>>     // filter if the user has app
>>     opt_params[opensocial.DataRequest.PeopleRequestFields.FILTER] =
>> opensocial.DataRequest.FilterType.HAS_APP;
>>
>> req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER,
>> opt_params), "viewer");
>>
>> req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),
>> "owner");
>>     req.send(onRequest);
>> }
>>
>> /*
>> basic setup callback
>> */
>> function onRequest(data)
>> {
>>
>>     // here you can check if the user has the app installed or not and
>> then call different functions to design the app on the way u need
>>
>>     var viewer = data.get("viewer").getData();
>>     var owner = data.get("owner").getData();
>>
>>     // viewer dont have the app installed
>>     if(viewer==null)
>>     {
>>         myFuncWithoutApp();
>>     }
>>     else
>>     {
>>         myFuncWithApp();
>>     }
>> }
>>
>> Ok ?
>>
>> -Robson
>> http://blogdodantas.dxs.com.br
>>
>> 2009/3/13 Felipe Oliveira <ifn...@gmail.com>
>>
>> Hi,
>>>
>>> I have a new question about app.
>>>
>>> Example:
>>>
>>> I have 50 friends on Orkut, but just 12 has app in profile, ok?
>>> If a friend do not has a app access on canvas view, e like show a
>>> different
>>> message.
>>>
>>> If has app, show app functions, do not has, show message information.
>>>
>>> How this test if the user has the application installed?
>>>
>>> Thanks.
>>>
>>> Felipe Oliveira.
>>>
>>>
>>>
>>
>> >>
>>
>
>
> --
> Atenciosamente,
> Felipe Oliveira.
>
> Cel.: (11) 8694-4253 / (11) 8027-3315
>
> São Paulo - SP
>



-- 
Atenciosamente,
Felipe Oliveira.

Cel.: (11) 8694-4253 / (11) 8027-3315

São Paulo - SP

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to opensocial-api@googlegroups.com
To unsubscribe from this group, send email to 
opensocial-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to