title: How to invite Facebook friends to my iOS application in Swift?
body: <p>I am developping an iOS application using Swift 4.</p>
  
  <p>I need that the user can invite his Facebook friends to use this application.</p>
  
  <p>I tried this code :</p>
  
  <pre><code> func inviteFacebookFriends(){
  
      let dialog = FBSDKAppInviteDialog()
      let content:FBSDKAppInviteContent = FBSDKAppInviteContent()
      content.appLinkURL = URL(string: "https://example/fbid")
      content.appInvitePreviewImageURL = URL(string: "http://www.queness.com/resources/images/png/apple_ex.png")
      dialog.content = content
      dialog.delegate = self
      do {
          try dialog.validate()
      }
      catch {
          print(error)
      }
  
      dialog.show()
  }
  </code></pre>
  
  <p>But nothing happened, there's no dialog appears.</p>
  
  <p>please help me to solve this issue.</p>