Beispiel #1
0
 /// <summary>
 /// 发送公众号模板消息(默认配置)
 /// </summary>
 /// <param name="message"></param>
 /// <param name="openids"></param>
 /// <returns></returns>
 public async System.Threading.Tasks.Task <Dictionary <string, TemplateMessageResult> > SendOffiAccountMessageAsync(OffiAccountMessage message, params string[] openids)
 {
     CheckOption(option);
     return(await SendOffiAccountMessageAsync(option.AppId, message, openids));
 }
Beispiel #2
0
        /// <summary>
        /// 发送公众号模板消息
        /// </summary>
        /// <param name="appid"></param>
        /// <param name="message"></param>
        /// <param name="openids"></param>
        /// <returns></returns>
        public async System.Threading.Tasks.Task <Dictionary <string, TemplateMessageResult> > SendOffiAccountMessageAsync(string appid, OffiAccountMessage message, params string[] openids)
        {
            var result = await offiAccountTemplate.SendTemplateMessageAsync((await tokenManager.GetAccessTokenAsync(appid)).AccessToken, message, openids);

            return(result);
        }