public class JwMessageCommentAPI extends Object
| 构造器和说明 |
|---|
JwMessageCommentAPI() |
| 限定符和类型 | 方法和说明 |
|---|---|
static net.sf.json.JSONObject |
closeComment(String accesstoken,
String msg_data_id,
int index) |
static net.sf.json.JSONObject |
deleteComment(String accesstoken,
String msg_data_id,
int index,
String user_comment_id)
删除评论
|
static net.sf.json.JSONObject |
deleteReplyComment(String accesstoken,
String msg_data_id,
int index,
String user_comment_id)
删除回复
|
static void |
main(String[] args) |
static net.sf.json.JSONObject |
markelectComment(String accesstoken,
String msg_data_id,
int index,
String user_comment_id)
将评论标记精选
|
static net.sf.json.JSONObject |
openComment(String accesstoken,
String msg_data_id,
int index)
开启评论
|
static net.sf.json.JSONObject |
queuryComments(String accesstoken,
net.sf.json.JSONObject params)
查询评论列表
|
static net.sf.json.JSONObject |
replyComment(String accesstoken,
String msg_data_id,
int index,
String user_comment_id,
String content)
回复评论
|
static net.sf.json.JSONObject |
unmarkelectComment(String accesstoken,
String msg_data_id,
int index,
String user_comment_id)
将评论取消精选
|
public static net.sf.json.JSONObject openComment(String accesstoken, String msg_data_id, int index) throws WexinReqException
accesstoken - msg_data_id - index - WexinReqExceptionpublic static net.sf.json.JSONObject closeComment(String accesstoken, String msg_data_id, int index) throws WexinReqException
public static net.sf.json.JSONObject queuryComments(String accesstoken, net.sf.json.JSONObject params) throws WexinReqException
accesstoken - params - { “msg_data_id” :"" , “index” : 1, “begin”: , “count”: , “type” : }
参数讲解
msg_data_id:群发返回的msg_data_id
index:多图文时,用来指定第几篇图文,从0开始,不带默认返回该msg_data_id的第一篇图文
begin:起始位置
count:获取数目(>=50会被拒绝)
type:type=0 普通评论&精选评论 type=1 普通评论 type=2 精选评论
{
“errcode”: 0, “errmsg” : “ok”, “total”: TOTAL,
“comment”: [{
user_comment_id : "用户评论id",
aroundopenid :"openid",
aroundcreate_time : "评论时间",
aroundcontent :"评论内容",
aroundcomment_type :"是否精选评论,0为即非精选,1为true",
reply :{ content :"作者回复内容",create_time : "作者回复时间 "}
}]
}
错误返回如下:
{ “errcode” : 45009, “errmsg” : “reach max api daily quota limit” //没有剩余的调用次数 }
{ “errcode” : 88000, “errmsg” : “open comment without comment privilege” //没有留言权限 }
{ “errcode” : 88001, “errmsg” : “msg_data is not exists” //该图文不存在 }
{ “errcode” : 88010, “errmsg” : “count range error. cout <= 0 or count > 50” //获取评论数目不合法 }
WexinReqExceptionpublic static net.sf.json.JSONObject markelectComment(String accesstoken, String msg_data_id, int index, String user_comment_id) throws WexinReqException
accesstoken - msg_data_id - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文user_comment_id - 用户评论id
{ “errcode” : 45009, “errmsg” : “reach max api daily quota limit” //没有剩余的调用次数 }
{ “errcode” : 88000, “errmsg” : “open comment without comment privilege” //没有留言权限 }
{ “errcode” : 88001, “errmsg” : “msg_data is not exists” //该图文不存在 }
{ “errcode” : 88003, “errmsg” : “elected comment upper limit” //精选评论数已达上限 }
{ “errcode” : 88004, “errmsg” : “comment was deleted by user” //已被用户删除,无法精选 }
{ “errcode” : 88008, “errmsg” : “comment is not exists” //该评论不存在 }
WexinReqExceptionpublic static net.sf.json.JSONObject unmarkelectComment(String accesstoken, String msg_data_id, int index, String user_comment_id) throws WexinReqException
accesstoken - msg_data_id - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文user_comment_id - 用户评论id
{ “errcode” : 45009, “errmsg” : “reach max api daily quota limit” //没有剩余的调用次数 }
{ “errcode” : 88000, “errmsg” : “open comment without comment privilege” //没有留言权限 }
{ “errcode” : 88001, “errmsg” : “msg_data is not exists” //该图文不存在 }
{ “errcode” : 88008, “errmsg” : “comment is not exists” //该评论不存在 }
WexinReqExceptionpublic static net.sf.json.JSONObject deleteComment(String accesstoken, String msg_data_id, int index, String user_comment_id) throws WexinReqException
accesstoken - msg_data_id - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文user_comment_id - 评论id
{ “errcode” : 45009, “errmsg” : “reach max api daily quota limit” //没有剩余的调用次数 }
{ “errcode” : 88000, “errmsg” : “open comment without comment privilege” //没有留言权限 }
{ “errcode” : 88001, “errmsg” : “msg_data is not exists” //该图文不存在 }
{ “errcode” : 88008, “errmsg” : “comment is not exists” //该评论不存在 }
WexinReqExceptionpublic static net.sf.json.JSONObject replyComment(String accesstoken, String msg_data_id, int index, String user_comment_id, String content) throws WexinReqException
accesstoken - msg_data_id - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文user_comment_id - 评论idcontent - 回复内容
{ “errcode” : 45009, “errmsg” : “reach max api daily quota limit” //没有剩余的调用次数 }
{ “errcode” : 88000, “errmsg” : “open comment without comment privilege” //没有留言权限 }
{ “errcode” : 88001, “errmsg” : “msg_data is not exists” //该图文不存在 }
{ “errcode” : 88005, “errmsg” : “already reply” //已经回复过了 }
{ “errcode” : 88007, “errmsg” : “reply content beyond max len or content len is zero”//回复超过长度限制或为0 }
{ “errcode” : 88008, “errmsg” : “comment is not exists” //该评论不存在 }
WexinReqExceptionpublic static net.sf.json.JSONObject deleteReplyComment(String accesstoken, String msg_data_id, int index, String user_comment_id) throws WexinReqException
accesstoken - msg_data_id - 群发返回的msg_data_idindex - 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文user_comment_id - 评论id
{ “errcode” : 45009, “errmsg” : “reach max api daily quota limit” //没有剩余的调用次数 }
{ “errcode” : 88000, “errmsg” : “open comment without comment privilege” //没有留言权限 }
{ “errcode” : 88001, “errmsg” : “msg_data is not exists” //该图文不存在 }
{ “errcode” : 88008, “errmsg” : “comment is not exists” //该评论不存在 }
{ “errcode” : 87009, “errmsg” : “reply is not exists” //该回复不存在 }
WexinReqExceptionpublic static void main(String[] args) throws WexinReqException
Copyright © 2022. All rights reserved.