line-bot-sdk-nodejs icon indicating copy to clipboard operation
line-bot-sdk-nodejs copied to clipboard

How to use uri action

Open EriecTanijaya opened this issue 7 years ago • 4 comments

this.client.replyMessage(this.event.replyToken,{ type : "uri", uri : "line://home/public/profile?id=xxxx", });

i try it but not working? i think my method is false

EriecTanijaya avatar Apr 09 '19 09:04 EriecTanijaya

There is no separate URI message. You can just send URI as a text message.

this.client.replyMessage(this.event.replyToken, {
  type: "text",
  text: "..."
});

For the types of messages, please refer to the documentation.

https://developers.line.biz/en/reference/messaging-api/#message-objects

hatashiro avatar Apr 09 '19 09:04 hatashiro

so just paste the URI inside ( text : " " ) ? like this ?

this.client.replyMessage(this.event.replyToken, { type: "text", text: "line://home/public/profile?id=xxxx" });

EriecTanijaya avatar Apr 09 '19 09:04 EriecTanijaya

Yes, it must work. Or you can use Flex Message if you like to implement fancier UI.

hatashiro avatar Apr 09 '19 09:04 hatashiro

thanks for fast respond!

EriecTanijaya avatar Apr 09 '19 10:04 EriecTanijaya