0
if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook)
 {
        let facebookSheet:SLComposeViewController = 
   SLComposeViewController(forServiceType: SLServiceTypeFacebook)

            facebookSheet.setInitialText("You can wash your cloths easy, join with Michigan Wash now !")
            let shareImageUrl = NSURL(string: "https:\/\/michiganwash.info\/uploads\/shareAssets\/logoimage.png")
            facebookSheet.addURL(shareImageUrl)

        }
        self.presentViewController(facebookSheet, animated: true, completion: nil)
    }

If I try to share text and image on the simulator it's work fine. I got the response like this image.

enter image description here But when I run this application on my device, it does not seems pre-populate text in the device. I got just image on right side.

Somebody has the better solution using this?

Imad Ali
  • 3,261
  • 1
  • 25
  • 33
Krunal Patel
  • 1,649
  • 1
  • 14
  • 22
  • 1
    You are not allowed to specify the message of a post/share for the user, they have to type it in themselves.. See https://developers.facebook.com/policy/, 2.3, and https://developers.facebook.com/docs/apps/review/prefill – CBroe May 29 '17 at 06:08
  • See this https://stackoverflow.com/questions/29890747/ios-how-to-share-text-and-image-on-social-networks Or go with Facebook integration With FBSDK – Jack May 29 '17 at 07:03

0 Answers0