2016-08-02 40 views
0

我正在尝试在我的应用中实施Firebase邀请功能。主要逻辑是用户在联系人列表中选择他/她的朋友,他们将通过Firebase邀请发送邀请来实现此目的,我想发送一些有关用户信息的和平以通过我的应用程序进行识别。另一方面,他/她的朋友将通过电子邮件/短信收到动态链接(我认为这就是Firebase邀请的工作方式),如果他/她根据该动态链接中的数据将其打开,则用户要求添加他作为他/她的朋友。 据火力地堡文档我可以看到这个代码如何通过动态链接通过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")方法发送。以及如何在朋友那边处理它。

谢谢。

回答

0

在火力地堡控制台创建动态链接:

  1. 打开火力地堡控制台。
  2. 通过单击边栏菜单上的动态链接打开动态链接页面。在此页面上,您可以看到动态链接列表及其点击率。
  3. 单击新建动态链接并确保选择生成动态链接。
  4. 为动态链接提供基本信息。 see documentation here

不知道在“朋友方”处理它。

+0

嗨,感谢您的答复,请你告诉我如何通过编写程序添加类似Name的动态链接。 – ilvcs