我正在尝试在我的应用中实现 Firebase 邀请功能。主要逻辑是用户在联系人列表中选择他/她的 friend ,他们将通过 Firebase Invites 发送邀请来实现此目的,我想发送一些有关用户的和平信息以供我的应用程序识别。在另一端,他/她的 friend 将通过电子邮件/短信收到动态链接(我认为这就是 Firebase 邀请的工作方式),如果他/她打开它,则根据该动态链接中的数据,用户将要求添加他作为他/她的 friend 。 根据 Firebase 文档,我可以看到这段代码
if let invite = FIRInvites.inviteDialog() {
invite.setInviteDelegate(self)
// NOTE: You must have the App Store ID set in your developer console project
// in order for invitations to successfully be sent.
// A message hint for the dialog. Note this manifests differently depending on the
// received invation type. For example, in an email invite this appears as the subject.
invite.setMessage("Try this out!\n -(GIDSignIn.sharedInstance().currentUser.profile.name)")
// Title for the dialog, this is what the user sees before
sending the invites.
invite.setTitle("Invites Example")
invite.setDeepLink("app_url")
invite.setCallToActionText("Install!")
invite.setCustomImage("https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png")
invite.open()
}
我的问题是如何创建一个包含用户信息的“app_url”以在 invite.setDeepLink("app_url")
方法中发送。以及在好友端如何处理。
谢谢。
最佳答案
在 Firebase 控制台中创建动态链接:
- 打开 Firebase 控制台。
- 通过单击侧边栏菜单上的“动态链接”打开“动态链接”页面。在此页面上,您可以看到动态链接及其点击率的列表。
- 点击“新建动态链接”并确保选择“生成动态链接”。
- 提供动态链接的基本信息。 see documentation here
不确定是否在“ friend 方”处理它。
关于ios - 如何通过 Firebase 邀请通过动态链接发送用户信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38721861/