0
Node APIでbotframeworkを使用していて、画像のサムネイルを持つHeroCardの添付ファイルでプロアクティブなメッセージを送信するにはどうすればいいですか?画像付きのプロアクティブなメッセージの送信
私の主な問題は、セッションを持たずにCardImageを作成できないことです。
app.get("/api/send_notification", (req, res) => {
let address = req.body.adr;
let msg = new builder.Message().address(address).text("some text");
let card = new builder.HeroCard()
.title("title")
.text("hero card text");
// .images([builder.CardImage.create(session, imgURL)]);
// There is no session when sending a proactive message;
msg.addAttachment(card);
bot.send(msg);
}
お勧めはありますか?
let img = [{url: imgURL}];
let card = new builder.HeroCard()
.title("title")
.text("hero card text")
.images(img);
img
を使用して終了