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);
        }
예제 #3
0
        /// <summary>
        /// Build-in twitter support on iOS doesn't require you to create a separate developer account
        /// </summary>
        partial void ShareTwitter_TouchUpInside(UIButton sender)
        {
            var twitter = new Twitter5Service();

            Share(twitter);
        }