line-liff-starter icon indicating copy to clipboard operation
line-liff-starter copied to clipboard

I can't get query string from url at LIFF

Open skypu3 opened this issue 5 years ago • 1 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 ?

skypu3 avatar Jul 29 '19 10:07 skypu3

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!

smwilk avatar Nov 15 '19 08:11 smwilk