消息群发
文本消息
message := "hello, broadcasting test..."
OfficialAccountApp.Broadcasting.SendText(message, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
图文消息
mediaID := ""
OfficialAccountApp.Broadcasting.SendNews(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
图片消息
mediaID := ""
OfficialAccountApp.Broadcasting.SendImage(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
语音消息
mediaID := ""
OfficialAccountApp.Broadcasting.SendVoice(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
视频消息
mediaID := ""
OfficialAccountApp.Broadcasting.SendVideo(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
卡劵消息
mediaID := ""
OfficialAccountApp.Broadcasting.SendCard(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
发送预览群发消息给指定的 openId
用户
message := ""
data, err := services.OfficialAccountApp.Broadcasting.PreviewText(ctx,message, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, "")
发送预览群发消息给指定的微信号用户
文档正在完善中…
删除群发消息
OfficialAccountApp.Broadcasting.Delete(ctx,"[msgID]", 0)
查询群发消息发送状态
OfficialAccountApp.Broadcasting.Status(ctx,"[msgID]")
使用示例
当前内容版权归 ArtisanCloud 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ArtisanCloud .