user5829250
user5829250

Reputation:

Share text on facebook post

How do I share text and a link for Facebook through UIActivityController? I can add an URL but not text, is this possible to do somehow?

I have the following today:

let activityItems = ["Some text", "", "http://test.com"]
let vc = UIActivityViewController(activityItems: activityItems, applicationActivities: nil)
self.presentViewController(vc, animated: true, completion: nil)

For twitter, mail and sms I get both the text and the URL, for Facebook only the URL.

So

  1. Is it possible to add text to the Facebook share?
  2. What does the second empty string parameter do?**

Upvotes: 1

Views: 1437

Answers (1)

Rashwan L
Rashwan L

Reputation: 38843

Facebook's policies don't allow you to pre-populate status messages and require all content to be user generated.

Reference.

Upvotes: 6

Related Questions