line-liff-starter
line-liff-starter copied to clipboard
I can't get query string from url at LIFF
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!