- Android
- iOS
- JavaScript
- Flutter
敬请期待
敬请期待
敬请期待
添加评论,同时支持回复某个人的评论。
参数说明
| 名称 | 类型 | 必填 | 默认值 | 描述 | 版本 |
|---|---|---|---|---|---|
| params | Object | 是 | - | 评论信息 | 1.9.6 |
| params.momentId | String | 是 | - | 朋友圈 ID | 1.9.6 |
| params.parentCommentId | String | 否 | - | 回复的评论 ID,回复根评论时为空字符串 | 1.9.6 |
| params.content | Object | 是 | - | 评论内容 | 1.9.6 |
回调说明
| 属性 | 类型 | 描述 | 版本 |
|---|---|---|---|
| result | Object | 查询结果 | 1.9.6 |
| result.comment | Object | 评论对象,结构请查看 Comment | 1.9.6 |
代码示例
// 回复评论
let comment = {
momentId: 'momentId',
parentCommentId: '',
content: {
text: '这是一条回复根评论'
}
};
jim.addComment(comment).then((result) => {
console.log('addComment successfully', result)
});
// 回复子评论
let content = {
text: '这是一条回复子评论'
};
jim.addComment({
momentId: 'momentId',
parentCommentId: 'parentCommentId',
content
}).then((result) => {
console.log('addComment successfully', result)
});