0
0

More than 3 years have passed since last update.

LINE Messaging APIで文末に絵文字を入れるメモ

Posted at

テキストの長さをとってそれをindexとしておく。


var pushText = "hogehoge";
// 文末に絵文字を入れるための準備
let textLength = pushText.length;
pushText += "$";

// メッセージ配列の初期化
let messageList = [];

// メッセージの作成
messageList = [{
  "type": "text",
  "text": pushText,
  "emojis": [
   {
    "index": textLength,
    "productId": "5ac1bfd5040ab15980c9b435",
    "emojiId": "005"
   }
 ]
},{
  "type": "sticker",
  "packageId": "11537",
  "stickerId": "52002755"
}];
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0