答案 0 :(得分:2)
$message .= iconv('UCS-4LE', 'UTF-8', pack('V', 0x1F453));
并在this link中,您可以在上面的代码中看到您需要输入的表情符号代码列表。
答案 1 :(得分:0)
执行步骤:
这是一个Java示例:
public InlineKeyboardMarkup getBtn() {
String label = "\uD83D\uDE04Laughing button";
String label2 = "\uD83D\uDE21Angry button";
InlineKeyboardMarkup markup = new InlineKeyboardMarkup();
List<List<InlineKeyboardButton>> keyboard = new ArrayList<>();
List<InlineKeyboardButton> row_1 = new ArrayList<>();
List<InlineKeyboardButton> row_2 = new ArrayList<>();
row_1.add(new InlineKeyboardButton(label).setCallbackData("1"));
row_2.add(new InlineKeyboardButton(label2).setCallbackData("2"));
keyboard.add(row_1);
keyboard.add(row_2);
markup.setKeyboard(keyboard);
return markup;
}