以编程方式将论坛添加到 IBM 连接社区



>我正在尝试添加一个论坛主题,然后向社区添加论坛条目。在 IBM API 文档之后,我将 Atom 条目发布到此 URL:/communities/service/atom/community/forum/topics?communityUuid=

我使用的 Atom 条目采用以下格式(来自 API 文档的示例): <?xml version="1.0" encoding="UTF-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:snx="http://www.ibm.com/xmlns/prod/sn"> <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="forum-topic"/> <title type="text">TEXT OF TOPIC</title> </entry>

每次我得到200个答案。我在操场上试了试,结果是一样的。

您知道我使用的URL是否正确吗?您知道 Atom 条目文档是否正确吗?

所以URL是正确的。
身体很可能不是。

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns:app="http://www.w3.org/2007/app" xmlns:snx="http://www.ibm.com/xmlns/prod/sn" xmlns:thr="http://purl.org/syndication/thread/1.0">
<title type="text">Test</title>
<category term="forum-topic" scheme="http://www.ibm.com/xmlns/prod/sn/type">
</category>
<content type="html">
&lt;p dir="ltr"&gt;
Test
&lt;/p&gt;
</content>
<snx:communityUuid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">3a246a15-b4d6-44e1-a01d-1c3d89f1f9a4</snx:communityUuid>
</entry>

请注意附加属性 <snx:communityUuid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">3a246a15-b4d6-44e1-a01d-1c3d89f1f9a4</snx:communityUuid>

发帖时,您需要参考社区 ID。

好的,能够在@paul的帮助下找到解决方案。

发布 Atom 文档所需的 URL 是:/forums/atom/topics?communityUuid=

Atom 文档应如下所示: <?xml version="1.0" encoding="UTF-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:snx="http://www.ibm.com/xmlns/prod/sn"> <title type="text">Test</title> <category term="forum-topic" scheme="http://www.ibm.com/xmlns/prod/sn/type"> </category> <content type="text"> test </content> <snx:communityUuid xmlns:snx="http://www.ibm.com/xmlns/prod/sn">19aa4e90-9307-46f1-9b69-5a8965e8ed61</snx:communityUuid> </entry>

最新更新