Person Data Extraction Methods
The helper methods defined for extracting Person data are:
opensocial.Person.getAppDataopensocial.Person.getDisplayNameopensocial.Person.getFieldopensocial.Person.getIdopensocial.Person.isOwneropensocial.Person.isViewer
The OpenSocial specification includes a number of alternate, streamlined methods for capturing a lot of the same social data you would through the aforementioned methods. These are embedded within the lightweight JavaScript API references.
Each method listed in the following sections supports several parameters, which are used to specify the data to be returned by the REST request to the container’s social endpoints.
osapi.people.get
get is the generic call within the lightweight JavaScript API
methods to collect a user’s data, and can be used to retrieve most of
the social details you will want to leverage.
The osapi.people.get(...)
method accepts a JSON object to define the type of information you
want, and takes the form:
osapi.people.get(params)Parameter list
The params list may consist
of:
auth(AuthToken)An optional authorization token for requesting data.
Example value:
HttpRequest.AuthorizationuserId(string or array of strings)A string or array of strings that defines the user about whom you want to collect data. You may use short identifiers such as
@me,@viewer, or@owner.Example value:
'@owner' or ['@me', '@owner']groupId(string)A string defining a group of people about whom you want to collect data. This value is especially useful ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access