微信开发之转发朋友圈的技术实现

发布时间 2023-07-28 14:50:02作者: WeChat——E云

E云 是一套完整的的第三方服务平台,包含微信API服务企微API服务SCRM系统定制企微系统定制服务类软件定制等模块,本文档主要讲述个微API服务相关,以下简称API,它能处理用户微信中的各种事件,提供了开发者与个微对接的能力,技术上来讲是一款基于微信提供的个人开放性API,使用简单,操作快捷,支持多种微信方式接入。

测试地址:https://wkteam.cn/

简要描述:

  • 转发朋友圈,直接xml数据。(对谁不可见)

请求URL:

  • http://域名地址/forwardSns

请求方式:

  • POST

请求头Headers:

  • Content-Type:application/json
  • Authorization:login接口返回

参数:

参数名必选类型说明
wId String 登录实例标识
content String 收到的xml
blackList String 对谁不可见(传微信id,多个用,分隔)
withUserList String 对谁可见 (传微信id,多个用,分隔)

请求参数示例

{
     "wId": "xxxxxxx",
     "content": "xxxxxxx"
}

成功返回示例

{
    "message": "成功",
    "code": "1000",
    "data": {
        "id": "xxxxxxx",
        "userName": "xxxxxxx",
        "nickName": "xxxxxxx",
        "createTime": xxxxxxx,
        "objectDesc": {
            "xml": "xxxxxxx",
            "len": xxxxxxx
        },
        "likeCount": xxxxxxx,
        "snsLikes": [],
        "commentCount": xxxxxxx,
        "snsComments": []
    }
}

错误返回示例

{
    "message": "失败",
    "code": "1001",
    "data": null
}

返回数据:

参数名类型说明
code string 1000成功,1001失败
msg String 反馈信息
id String 朋友圈ID
userName String 微信id
createTime String 时间
objectDesc JSONObject 朋友圈内容
xml String 朋友圈xml
len int xml 长度
commentId int 评论标识 replyCommentId
replyCommentId int 回复评论标识
deleteFlag int 删除标识
isNotRichText int 是否试富文本
content String 评论内容
commentId int 评论ID
snsLikes JSONArray 点赞用户列表
userName String 微信id
nickName String 昵称
type int 点赞类型
createTime int 点赞时间