Skip to main content

opensocial.Message

Method​

opensocial.message.getField​

String getField(key, opt_params)

Acquires data for the Message linked to the specified key.

Parameter​
NameTypeDescription
keyStringKey for acquiring data. Refer to the Field class for possible values.
opt_paramsMap.<opensocial.DataRequest.DataRequestFieldsObject>
Return value​
TypeDescription
StringData
Sample​
var title = message.getField(opensocial.Message.Field.TITLE);

opensocial.Message.setField​

setField(key, data)

Sets data in the Message with the specified key.

Parameter​
NameTypeDescription
keyStringThe key to set in data
StringStringThe data to set
Return value​

None

Sample​
message.setField(opensocial.Message.Field.TITLE, "Hello!");

opensocial.Message.Field​

opensocial.Message.Field.TYPE​

The type of message.

opensocial.Message.Field.TITLE​

The title of the message.

opensocial.Message.Field.BODY​

opensocial.Message.Field.TITLE_ID​

Not supported.

opensocial.Message.Field.BODY_ID​

Not supported.

opensocial.Message.Type​

opensocial.Message.Type.EMAIL​

Not supported.

opensocial.Message.Type.NOTIFICATION​

Not supported.

opensocial.Message.Type.PRIVATE_MESSAGE​

Specifies MiniMail as the type.

opensocial.Message.Type.PUBLIC_MESSAGE​

Not supported.

Revision History​

  • 12/2010
    • Initial Release.