Difference between revisions of "OpenSocial RequiredFields"

From VZ Developer Wiki
Jump to: navigation, search
(OpenSocial Required Fields)
(OpenSocial Required Fields (Available (Will be released on 2011-01-17))
Line 5: Line 5:
 
  <Require feature="opensocial-0.9"/>
 
  <Require feature="opensocial-0.9"/>
 
</source>
 
</source>
 +
[...]
 
</code>
 
</code>
you might consider restricting the vCard fields your gadget is requesting from the user's personal data. The allowed fields are
+
you might consider restricting the vCard fields your gadget is requesting from the user's personal data. The available field names are
 
* gender
 
* gender
 
* birthday
 
* birthday
Line 14: Line 15:
 
* thumbnailUrl
 
* thumbnailUrl
 
* photos
 
* photos
 +
Applied in a gadget.xml snipplet, requesting the fields gender, emails, and the thumbnail URL will look as follows
 +
<code>
 +
<source lang="xml">
 +
<Require feature="opensocial-0.8">
 +
        <RequiredFields>
 +
                <Field>gender</Field>
 +
                <Field>emails</Field>
 +
                <Field>thumbnailUrl</Field>
 +
        </RequiredFields>
 +
</Require>
 +
 +
</source>
 +
[...]
 +
</code>

Revision as of 12:45, 20 December 2010

OpenSocial Required Fields (Available (Will be released on 2011-01-17)

If your gadget is taking advantage of OpenSocial functionalities and is therefore declared as a social gadget with 'opensocial-x.x' as required:

 <Require feature="opensocial-0.9"/>

[...] you might consider restricting the vCard fields your gadget is requesting from the user's personal data. The available field names are

  • gender
  • birthday
  • emails
  • addresses
  • phoneNumbers
  • thumbnailUrl
  • photos

Applied in a gadget.xml snipplet, requesting the fields gender, emails, and the thumbnail URL will look as follows

 <Require feature="opensocial-0.8">
        <RequiredFields>
                <Field>gender</Field>
                <Field>emails</Field>
                <Field>thumbnailUrl</Field>
        </RequiredFields>
</Require>

[...]