Appearance
{BASE_URL}/wx-api/api/friend/commentSns
对某条朋友圈动态发评论,或对某条评论追评(回复)。
appid
string
we_xxxxxxxxxxxxxxx
sid
int64
7658992575255311044
content
评论内容122333
refCommentId
3
POST {BASE_URL}/wx-api/api/friend/commentSns Authorization: Bearer <你的 App Token> Content-Type: application/json { "appid": "we_xxxxxxxxxxxxxxx", "sid": 7658992575255311044, "content": "评论内容122333", "refCommentId": 3 }
curl -X POST '{BASE_URL}/wx-api/api/friend/commentSns' \ -H 'Authorization: Bearer <你的 App Token>' \ -H 'Content-Type: application/json' \ --data-raw '{ "appid": "we_xxxxxxxxxxxxxxx", "sid": 7658992575255311044, "content": "评论内容122333", "refCommentId": 3 }'
import requests url = "{BASE_URL}/wx-api/api/friend/commentSns" headers = {"Authorization": "Bearer <你的 App Token>", "Content-Type": "application/json"} body = """{ "appid": "we_xxxxxxxxxxxxxxx", "sid": 7658992575255311044, "content": "评论内容122333", "refCommentId": 3 }""" resp = requests.post(url, headers=headers, data=body.encode("utf-8")) print(resp.text)
import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; String url = "{BASE_URL}/wx-api/api/friend/commentSns"; String body = "{\n" + " \"appid\": \"we_xxxxxxxxxxxxxxx\",\n" + " \"sid\": 7658992575255311044,\n" + " \"content\": \"评论内容122333\",\n" + " \"refCommentId\": 3\n" + "}"; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder(URI.create(url)) .header("Authorization", "Bearer <你的 App Token>") .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(body)) .build(); HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body());
<?php $url = '{BASE_URL}/wx-api/api/friend/commentSns'; $body = <<<'JSON' { "appid": "we_xxxxxxxxxxxxxxx", "sid": 7658992575255311044, "content": "评论内容122333", "refCommentId": 3 } JSON; $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $body); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer <你的 App Token>', 'Content-Type: application/json', ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
解析响应前确认字段
返回字段见本页「说明与注意」和客户朋友圈模块总览。完整响应格式及未列出的字段,请通过开通与支持联系对接人确认后再解析。
code
detail
message
time
发布朋友圈评论
对某条朋友圈动态发评论,或对某条评论追评(回复)。
说明与注意
请求参数
appidstringwe_xxxxxxxxxxxxxxxsidint647658992575255311044contentstring评论内容122333refCommentIdint643请求示例
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
响应示例
解析响应前确认字段
返回字段见本页「说明与注意」和客户朋友圈模块总览。完整响应格式及未列出的字段,请通过开通与支持联系对接人确认后再解析。
响应字段
codeint64detailstringmessagestringtimestring下一步