So I've been writing an app that needs to use Social framework to share text via twitter and facebook.
I got it to work but it did not dismiss (?), then I remembered the completion handler, but whatever I do this handler keeps on giving me errors.
var okFacebook :Bool = SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook)
var okTwitter :Bool = SLComposeViewController.isAvailableForServiceType(SLServiceTypeTwitter)
var okLinkedIn : Bool = SLComposeViewController.isAvailableForServiceType(SLServiceTypeLinkedIn)
var socialVC :SLComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeTwitter)
socialVC.completionHandler = SLComposeViewControllerCompletionHandler(SLComposeViewControllerResult) -> Void
self.presentViewController(socialVC, animated: true, completion: nil)
Try the following code, not yet tested