1

I am using firebase dynamic linking to send app invitation using email and sms gateway. Basically, I am sending the invite code in deep link. User who's installs with that invite code is connected to my user circle.

Now, I want to send invite code to my Facebook friends. Is there a way to send deep link through Facebook invite.

Following is the code to send the Facebook app invite:

@IBAction func showFacebookInvite(_ sender: AnyObject) {
    let content = FBSDKAppInviteContent()
    content.appLinkURL = URL(string: "https://fb.meXXXXX")

    let obj = FBSDKAppInviteDialog()

    obj.content = content
    obj.delegate = self
    let temp = FBSDKAppInviteDialog.validate(obj)
    print(temp)

    content.destination = .facebook
    FBSDKAppInviteDialog
        .show(from: self, with: content, delegate: self)
}

Any suggestions.

Oleksiy Ivanov
  • 2,454
  • 15
  • 21
user3804063
  • 809
  • 1
  • 14
  • 32

1 Answers1

0

You can assign Firebase Dynamic Link to content.appLinkURL . When Facebook friend accepts the invite, friend will navigate to the link and install the App.

This should function identical to email/sms gateway.

To create short FDL links use iOS Builder API https://firebase.google.com/docs/dynamic-links/ios/create

Oleksiy Ivanov
  • 2,454
  • 15
  • 21
  • if i add my dynamic link , then Facebook sdk is complaint about missing app url. so that way not possible. – user3804063 Oct 18 '17 at 08:58
  • That's interesting. Is there a chance you can create reproducible example App for this? And share source code? I will try to find a way to make FDL work with Facebook invite feature. – Oleksiy Ivanov Oct 18 '17 at 18:27
  • i told this about firebase support and they told unfortunately they do not support this but we can share . But share is not the feature i am looking for . I am looking one to one invite . anyway thank you very much. Appreciated. – user3804063 Oct 19 '17 at 03:12