I don't think you can add tags to status updates. At least you don't seem to be able to in the Connections UI so I don't see why you would be able to programmatically. I believe you should be using the micro-blogging API to post status updates.
What is the JSON syntax to add tags to a statusupdate in IBM Connections?
-
26-06-2022 - |
Pregunta
I want to post (programmatically) a statusupdate to the activitystream in IBM Connections (4.0). I am looking for the correct place to put this JSON
"tags":[{"objectType":"tag","displayName":"ibms"}],
I have tried this:
{
"actor": {
"id": "@me"
},
"verb": "post",
"title": "${share}",
"content":"This event is my <i>second entry</i> #ibms",
"updated": "2013-01-01T12:00:00.000Z",
"object": {
"summary": "First Entry details #ibms",
"tags":[{"objectType":"tag","displayName":"ibms"}],
"objectType": "note",
"id": "objectid5",
"displayName": "First entry",
}
}
And the entry is posted succesfully, but the tags are not there, I am looking for a sample that correctly posts a note to the activitystream containing tags
Solución 2
Otros consejos
On the question of posting a status update to a community just replace the @me in /ublog/@me/@all with the id of the community in question and post as usual. e.g.
/connections/opensocial/rest/ublog/urn:lsid:lconn.ibm.com:communities.community:7ee13563-a7d6-41f1-9fdb-e7eb979900e4/@all
You do need to have rights to Post to the community needless to say.
I know activity streams has some suggested base extensions, as indicated here. http://activitystrea.ms/head/activity-schema.html#tags-property
"tags": [
{
"objectType": "person",
"displayName": "John"
},
{
"objectType": "person",
"displayName": "Jane"
}
]
As in the following example
{
"provider": {
"id": "http://www.ibm.com/xmlns/prod/sn",
"displayName": "IBM Connections - News Service",
"url": "https://greenhouse.lotus.com/news"
},
"generator": {
"image": {
"url": "https://greenhouse.lotus.com/connections/resources/web/com.ibm.oneui3.styles/imageLibrary/Icons/ComponentsGray/ProfilesGray16.png?etag=20130711.110413"
},
"id": "profiles",
"displayName": "IBM Connections - Profiles",
"url": "https://greenhouse.lotus.com/profiles"
},
"actor": {
"objectType": "person",
"id": "@me",
"displayName": "Paul Bastide"
},
"title": "Test from Paul",
"object": {
"summary": "TTest",
"objectType": "note",
"author": {
"connections": {
"state": "active"
},
"objectType": "person",
"id": "urn:lsid:lconn.ibm.com:profiles.person:9f9c3740-88ed-102b-9b41-bfd8328767c1",
"displayName": "Paul"
},
"id": "urn:lsid:lconn.ibm.com:profiles.note:74b5fd86-3a1d-4f11-93a2-8a771d9e877e",
"likes": {
"totalItems": 0
},
},
"verb": "post",
"tags": [
{
"objectType": "person",
"displayName": "John"
},
{
"objectType": "person",
"displayName": "Jane"
}
]
}
Perhaps add it under the context as well...