消息群发
文本消息
go
message := "hello, broadcasting test..."
OfficialAccountApp.Broadcasting.SendText(message, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
图文消息
go
mediaID := ""
OfficialAccountApp.Broadcasting.SendNews(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
图片消息
go
mediaID := ""
OfficialAccountApp.Broadcasting.SendImage(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
语音消息
go
mediaID := ""
OfficialAccountApp.Broadcasting.SendVoice(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
视频消息
go
mediaID := ""
OfficialAccountApp.Broadcasting.SendVideo(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
卡劵消息
go
mediaID := ""
OfficialAccountApp.Broadcasting.SendCard(ctx,mediaID, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, &power.HashMap{})
发送预览群发消息给指定的 openId
用户
go
message := ""
data, err := services.OfficialAccountApp.Broadcasting.PreviewText(ctx,message, &request.Reception{
ToUser: []string{"[openID]"},
Filter: &request.Filter{
IsToAll: false,
TagID: 0,
},
}, "")
发送预览群发消息给指定的微信号用户
文档正在完善中...
删除群发消息
go
OfficialAccountApp.Broadcasting.Delete(ctx,"[msgID]", 0)
查询群发消息发送状态
go
OfficialAccountApp.Broadcasting.Status(ctx,"[msgID]")