Android – is there any way to reward firebase for inviting senders to accept their invitation?

I have an application that allows users to invite their friends through firebase. I want to reward the sender of the invitation, but only if their invitation has been accepted and not just sent. Does firebase support this function? If not, what is the best / easiest way to implement it yourself?

resolvent:

Assuming you have some back-end logic, it's easy to do it yourself. You want to add some data to the outgoing invitation and link it back to the originator. Then, the recipient client can extract the data and send it to your database, and then reward your originator

What data will you send by invitation? It depends. One option is to simply add the sender's userid to your invitation data. This is easy, but it will disclose the sender's user ID, which may or may not be what you want. Another method may be to generate a recommendation code associated with the user, but not their ID (think of your typical Uber or LYFT recommendation code) The third method is to ping your backend and generate a unique invitation ID to link to the sender and the reward itself. Personally, I like this last option best because it also means that this URL is more resistant to deception

Good luck!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>