import Social
...
@IBAction func postTwitter(sender:AnyObject){
let twVC:SLComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeTwitter)!
twVC.setInitialText("twにつぶやく文章");
twVC.addImage(UIImage(named:"icon.png"));
twVC.addURL(NSURL(string: "http://xxx.com"));
self.presentViewController(twVC, animated: true, completion: nil)
};
@IBAction func postFacebook(sender:AnyObject){
let fbVC:SLComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeFacebook)!
fbVC.setInitialText("fbにつぶやく文章")
fbVC.addImage(UIImage(named:"icon.png"));
fbVC.addURL(NSURL(string: "http://xxx.com"));
self.presentViewController(fbVC, animated: true, completion: nil)
};