Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I receive query parameters from Firebase Dynamic Links using react-native-firebase?

I've followed the instructions from the official react-native-firebase documentation and everything, as per the instructions, works fine.

It is my understanding that I should be able to create a link like the following in the Firebase Dynamic Links console: https://myapp.page.link/offer?offerid=123456 and be able to receive the offerid parameter in my app. However, when I click that link (in the iOS simulator, Android emulator, and on a real device) the app opens, but I just get a link with the following data:

Received initial link {"minimumAppVersion": null, "url": "https://mysite.co/offers"}

There are no query string parameters attached. Am I missing something in the Firebase Dynamic Link configuration? Or in my implementation of react-native-firebase that was not covered in the documentation linked above? Or is this actually just not possible?

like image 367
user2719094 Avatar asked Jul 24 '26 05:07

user2719094


1 Answers

I think you are confusing deep links with dynamic links. Dynamic links handle your deep links to content depending upon the platform.

Example you have a deep link: https://example.com/offer?offerid=123456 . You wish to open it in your app depending upon the platform.

Suppose you created a domain for dynamic link from console: https://myapp.page.link

Now you can create a dynamic link which opens the deep linked content on your app. The dynamic link can take in only specific parameters as mentioned here. However you can pass your parameters to your deep link,

https://myapp.page.link/?link=https%3A%2F%2Fexample.com%2Foffer%3Fofferid%3D123456&apn=com.example.app&ibi=com.example.app

The above dynamic link opens the deep link in your android app with package name com.example.app and ios app with bundle ID com.example.app.

like image 90
Ashutosh Pathak Avatar answered Jul 27 '26 03:07

Ashutosh Pathak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!