我想(以编程方式)将statusupdate发布到IBM Connections(4.0)中的activitystream。我正在寻找放置这个JSON的正确位置
"tags":[{"objectType":"tag","displayName":"ibms"}],
我试过这个:
{
"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",
}
}
条目成功发布,但标签不存在,我正在寻找一个样本,正确地将注释发布到包含标签的activitystream
答案 0 :(得分:3)
关于向社区发布状态更新的问题,只需将/ ublog / @ me / @ all中的@me替换为相关社区的ID,并照常发布。 e.g。
/connections/opensocial/rest/ublog/urn:lsid:lconn.ibm.com:communities.community:7ee13563-a7d6-41f1-9fdb-e7eb979900e4/@all
您确实需要拥有向社区发帖的权利,不用说。
答案 1 :(得分:2)
我认为您无法在状态更新中添加标签。至少你似乎无法在Connections UI中,所以我不明白为什么你能够以编程方式。我相信您应该使用micro-blogging API发布状态更新。
答案 2 :(得分:0)
我知道活动流有一些建议的基本扩展,如此处所示。 http://activitystrea.ms/head/activity-schema.html#tags-property
"tags": [
{
"objectType": "person",
"displayName": "John"
},
{
"objectType": "person",
"displayName": "Jane"
}
]
如以下示例所示
{
"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"
}
]
}
或许也可以在上下文中添加它......