简体   繁体   English

Firebase邀请:如何使用Firebase邀请发送推荐代码

[英]Firebase Invites: How to send referral code with Firebase Invites

I want to send link with refferal code via Firebase Invites. 我想通过Firebase邀请发送带有反馈代码的链接。 I know what I can do it with Dynamic Links but don't know how to make it with Invites. 我知道我可以使用动态链接做什么,但不知道如何使用邀请。 Is it possible to change generated by Firebase Invites dynamic link to my custom dynamic link? 是否可以将Firebase邀请生成的动态链接更改为我的自定义动态链接?

Also when I send standard invitation with Firebase Invites it's always open Google Play even if app is installed. 此外,当我向Firebase邀请发送标准邀请时,即使安装了应用,也始终打开Goog​​le Play。 Can I change it? 我可以改变吗?

Why not use the invite ID as the referral code? 为什么不使用邀请ID作为推荐代码?

For example, inside onActivityResult : 例如,在onActivityResult

val ids = AppInviteInvitation.getInvitationIds(resultCode, data!!) 

You can then send these to your server, and you know they are user x inviting user y, and as such are referral codes. 然后,您可以将这些发送到您的服务器,并且您知道它们是用户x邀请用户y,因此是引用代码。


Alternatively, you could use the deeplink functionality to link to a specific part of your app (eg /referral/X12345 ), thus retaining your existing referral codes. 或者,您可以使用深层链接功能链接到应用的特定部分(例如/referral/X12345 ),从而保留现有的推介代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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