public void TweetWithItem(Item item) { var rootViewController = UIApplication.SharedApplication.KeyWindow.RootViewController; var twitter = new Twitter5Service(); var shareUI = twitter.GetShareUI(item, result => { rootViewController.DismissViewController(true, null); }); rootViewController.PresentViewController(shareUI, true, null); }
public void TweetWithItem(string text, string image) { var rootViewController = UIApplication.SharedApplication.KeyWindow.RootViewController; var twitter = new Twitter5Service(); var item = new Item { Text = text }; if (image != null) { item.Images.Add(image); } var shareUI = twitter.GetShareUI(item, result => { rootViewController.DismissViewController(true, null); }); rootViewController.PresentViewController(shareUI, true, null); }