简体   繁体   中英

Can't put custom parameters to Firebase Dynamic links

I need to put custom query params to firebase dynamic link leading to AppStore. Once a user has installed the app I need to get that URL with query params.

I tried to build both short and long dynamic links, but it doesn't work.

Firebase dynamic link configuration for https://myApp.page.link/ios : 在此处输入图片说明

Things I've tried:

1) https://myApp.page.link/ios/?link=https://apps.apple.com/ru/app...&ifl=https://www.google.com&gclid=4324234

2) https://myApp.page.link/?link=https://apps.apple.com/ru/app...&gclid=4324234

3) https://myApp.page.link/?link=https://apps.apple.com/ru/app...?gclid=4324234

4) https://myApp.page.link/?link=https://apps.apple.com/ru/app...&ifl=https://www.google.com&gclid=4324234

Inside the app I try to get the initial link using flutter firebase_dynamic_links pub package and i always get only link, leading to AppStore with no query params.

What am I doing wrong? How should links look like to be able to put custom param into app?

You need to make sure that the parameters of your deep link are URL Encoded. For example, if your deep link look like this:

https://example.com/login?token=GDGEGDFGE345DF

Then your long dynamic link should look something like this:

https://example.page.link/?link=https://example.com/login?token%3DGDGEGDFGE345DF&apn=com.my.app.package&ibi=com.my.app.bundle

As you can see the token= parameter becomes token%3D , the = sign is encoded. Otherwise, firebase_dynamic_links cannot parse your deep link correctly and you may not get any query parameters back.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM