You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ajay singh <aj...@tekritisoftware.com> on 2008/07/11 15:45:52 UTC

How shindig detects support fields for SNS

Thank you Chris for previous reply, it helped lot.

How Shindig came to know that any field is supported by SNS.
As I know opensocial uses this for getting supported field - opensocial.getEnvironment().supportsField(opensocial.Environment.PERSON, opensocial.Person.Field.GENDER);
(If I am wrong please correct me. because it always return false for partuja code)

But How will shindig know this information OR we have to write this code in SNS.

Thanks
Ajay




Re: How shindig detects support fields for SNS

Posted by Cassie <do...@google.com>.
perhaps because your enum references are wrong? you need

opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.PERSON,
opensocial.Person.Field.NAME <http://opensocial.person.field.name/>);

or you can just try
opensocial.getEnvironment().supportsField('person',
'name'<http://opensocial.person.field.name/>
);

- cassie


On Fri, Jul 11, 2008 at 7:07 AM, ajay singh
<aj...@tekritisoftware.com>wrote:

> Thanks Chris,
> But these lines always reutrn false
>
> opensocial.getEnvironment().supportsField(opensocial.Environment.person,
> opensocial.Person.Field.name);
>
> what is wrong here?
> Chris Chabot <ch...@xs4all.nl> wrote: check out
> shindig/config/container.js
>
> Specifically the part that reads:
>
>     "supportedFields" : {
>        "person" : ["id", "name", "thumbnailUrl", "profileUrl"],
>        "activity" : ["id", "title"]
>     },
>
> Just add the fields you want to support through the open social api
> calls to the person list (make sure you get the naming right though:P)
>
>  -- Chris
>
> On Jul 11, 2008, at 3:45 PM, ajay singh wrote:
>
> > Thank you Chris for previous reply, it helped lot.
> >
> > How Shindig came to know that any field is supported by SNS.
> > As I know opensocial uses this for getting supported field -
> > opensocial
> > .getEnvironment().supportsField(opensocial.Environment.PERSON,
> > opensocial.Person.Field.GENDER);
> > (If I am wrong please correct me. because it always return false for
> > partuja code)
> >
> > But How will shindig know this information OR we have to write this
> > code in SNS.
> >
> > Thanks
> > Ajay
> >
> >
> >
>
>
>
>
>

Re: How shindig detects support fields for SNS

Posted by ajay singh <aj...@tekritisoftware.com>.
Thanks Chris,
But these lines always reutrn false

opensocial.getEnvironment().supportsField(opensocial.Environment.person, opensocial.Person.Field.name);

what is wrong here?
Chris Chabot <ch...@xs4all.nl> wrote: check out shindig/config/container.js

Specifically the part that reads:

     "supportedFields" : {
        "person" : ["id", "name", "thumbnailUrl", "profileUrl"],
        "activity" : ["id", "title"]
     },

Just add the fields you want to support through the open social api  
calls to the person list (make sure you get the naming right though:P)

 -- Chris

On Jul 11, 2008, at 3:45 PM, ajay singh wrote:

> Thank you Chris for previous reply, it helped lot.
>
> How Shindig came to know that any field is supported by SNS.
> As I know opensocial uses this for getting supported field -  
> opensocial 
> .getEnvironment().supportsField(opensocial.Environment.PERSON,  
> opensocial.Person.Field.GENDER);
> (If I am wrong please correct me. because it always return false for  
> partuja code)
>
> But How will shindig know this information OR we have to write this  
> code in SNS.
>
> Thanks
> Ajay
>
>
>





Re: How shindig detects support fields for SNS

Posted by Chris Chabot <ch...@xs4all.nl>.
check out shindig/config/container.js

Specifically the part that reads:

     "supportedFields" : {
        "person" : ["id", "name", "thumbnailUrl", "profileUrl"],
        "activity" : ["id", "title"]
     },

Just add the fields you want to support through the open social api  
calls to the person list (make sure you get the naming right though:P)

	-- Chris

On Jul 11, 2008, at 3:45 PM, ajay singh wrote:

> Thank you Chris for previous reply, it helped lot.
>
> How Shindig came to know that any field is supported by SNS.
> As I know opensocial uses this for getting supported field -  
> opensocial 
> .getEnvironment().supportsField(opensocial.Environment.PERSON,  
> opensocial.Person.Field.GENDER);
> (If I am wrong please correct me. because it always return false for  
> partuja code)
>
> But How will shindig know this information OR we have to write this  
> code in SNS.
>
> Thanks
> Ajay
>
>
>