title: Can't share screenshot & URL in Facebook using UIActivityViewController
body: <p>I am using <code>UIActivityViewController</code> to share text, a screenshot and a URL. It works fine for Twitter, email, SMS etc. In fact everything except Facebook. </p>
  
  <p>As I understand it, Facebook no longer allows pre-filled text to be shared, so I expect just the screenshot and URL to be shared. But when the user selects Facebook, the image that appears is an image taken directly from the URL instead of the image I specify (ie the screenshot). <a href="http://i.stack.imgur.com/CCrTH.png" rel="nofollow">Here is a screenshot</a> of what happens when I use www.google.com as the URL.</p>
  
  <p>If I don't include a URL, then the screenshot appears just fine, but in effect it is just sharing a photo (which is how it appears on Facebook, saying "John Doe added a new photo" and then my screenshot is shown). This all happens whether I'm logged into the Facebook app or not.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>@IBAction func shareButton(sender: AnyObject) {
    // Get screenshot
    UIGraphicsBeginImageContextWithOptions(UIScreen.mainScreen().bounds.size, false, 0)
    self.view.drawViewHierarchyInRect(view.bounds, afterScreenUpdates: true)
    let screenshot:UIImage = UIGraphicsGetImageFromCurrentImageContext()
    UIGraphicsEndImageContext()
  
    let textToShare = "My text here"
    let myWebsite = NSURL(string: "http://www.example.com/")
  
    socialShare(sharingText: textToShare, sharingImage: screenshot, sharingURL: myWebsite)
  }
  </code></pre>
  
  <p>And then:</p>
  
  <pre><code>func socialShare(sharingText sharingText: String?, sharingImage: UIImage?, sharingURL: NSURL?) {
    var sharingItems = [AnyObject]()
  
    if let text = sharingText {
      sharingItems.append(text)
    }
  
    if let image = sharingImage {
      sharingItems.append(image)
    }
  
    if let url = sharingURL {
      sharingItems.append(url)
    }
  
    let activityViewController = UIActivityViewController(activityItems: sharingItems, applicationActivities: nil)
  
    // Excluded sharing options
    activityViewController.excludedActivityTypes = [UIActivityTypeCopyToPasteboard,UIActivityTypeAirDrop,UIActivityTypeAddToReadingList,UIActivityTypeAssignToContact,UIActivityTypePostToTencentWeibo,UIActivityTypePostToVimeo,UIActivityTypePrint,UIActivityTypePostToWeibo]
  
    // The popover needs additional code to work on iPad, so distinguish between iPhone &amp; iPad
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.Phone) { // If iPhone
      self.presentViewController(activityViewController, animated: true, completion: nil)
    } else { // If iPad
      let popoverCntlr = UIPopoverController(contentViewController: activityViewController)
      popoverCntlr.presentPopoverFromRect(CGRectMake(self.view.frame.size.width - 40, 80, 0, 0), inView: self.view, permittedArrowDirections: UIPopoverArrowDirection.Up, animated: true) // position where the popover appears
    }
  }
  </code></pre>
  
  <p>So does anybody know how to share a screenshot AND a URL via Facebook using UIActivityViewController? I suspect the problem is caused from the Facebook end as everything works fine for Twitter etc, but is there a workaround?</p>