I am trying to implement a referral code which users can enter when registering thereby, the referral code sender, as well the person who is inputting the code when registering, they both get some rewards.
I looked into firebase dynamic links.,
But what if the other person doesn't even have the app installed?
So I thought each user will have a referral code, and they will be able to share it to others, which others just copy paste in the registration activity.
How do I implement this?,
The backend will be in PHP, I can code that.

- 97
- 7
-
you should register your app schema url like https://myapp.io so when app is not installed it will open your website and you can show download link – Farhad Sep 06 '20 at 09:53
-
I want the new user to enter a referral code if any, and then this would be saved in their db. – hindisong.cc Sep 06 '20 at 14:03
-
in register form consider a field for referral code and in the back end check that code which exists or not if true then link two users with that referral code – Farhad Sep 06 '20 at 14:08
2 Answers
Ok, I just figured it out. I need to generate a random alphanumeric code for each user when they register, and store them in a mysql database on server side. Each time the user shares the referral code, the code when is input by another user, gets stored in the another user's referred code. I can retrieve the same using mysql query on the phpmyadmin. Thereby reducing the need to have a php admin panel.

- 97
- 7
Hmm, depending on what type of database you use, I would say you can associate a referral code to each user, create a collection of all the referral codes (by going through all the users the first time, and then adding a new referral code when a new user comes). When you have a referral code associated with each user, and a collection of all the referral code, you will have the implementation you want easily.

- 174
- 5