line / line-liff-starter

This is a small web application that demonstrates the basic functionality of the LINE Front-end Framework (LIFF).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can't get query string from url at LIFF

skypu3 opened this issue · comments

I used the let urlParams = new URLSearchParams(window.location.search);
to get parameter from LIFF.
However, it is undefined, do you know how to get query string from LIFF ?

Hi @skypu3, thank you for your question, and I apologize for the lack of response.
You should be able to get the query string parameters using URLSearchParams.
For example (using your syntax),

let urlParams = new URLSearchParams(window.location.search);
console.log(urlParams.get('{some_parameter}'));

should print the query parameter you want.

I hope this helps!