0

我想(以编程方式)将状态更新发布到 IBM Connections (4.0) 中的活动流。我正在寻找放置此 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",

}

}

并且该条目已成功发布,但标签不存在,我正在寻找一个样本,该样本可以正确地将注释发布到包含标签的活动流

4

3 回答 3

3

关于向社区发布状态更新的问题,只需将 /ublog/@me/@all 中的 @me 替换为相关社区的 id 并照常发布。例如

/connections/opensocial/rest/ublog/urn:lsid:lconn.ibm.com:communities.community:7ee13563-a7d6-41f1-9fdb-e7eb979900e4/@all

不用说,您确实需要有权向社区发布。

于 2013-09-02T23:15:06.097 回答
2

我认为您不能将标签添加到状态更新中。至少您似乎无法在 Connections UI 中使用,所以我不明白您为什么能够以编程方式进行操作。我相信您应该使用微博 API来发布状态更新。

于 2013-08-29T01:13:05.447 回答
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"
      }
    ]
        }

也许也可以在上下文中添加它...

于 2013-08-28T13:20:25.490 回答