我成功將照片發佈到Twitter。但是,如何使用我的C#應用程序將視頻發佈到Twitter呢?發佈圖片我使用了Tweetsharp。我們可以使用Tweetsharp的SendTweetWithMediaOptions來分享視頻嗎?如果是的話如何?將視頻發佈到twitter
這是樣品我用來分享圖片到Twitter
Bitmap img = new Bitmap(Server.MapPath(@"~/Images/Special/" + Convert.ToInt32(offerId) + "/" + specialOffer.Picture));
MemoryStream ms = new MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
ms.Seek(0, SeekOrigin.Begin);
Dictionary<string, Stream> images = new Dictionary<string, Stream> { { "mypicture", ms } };
var tweet = tweetservice.SendTweetWithMedia(new SendTweetWithMediaOptions { Status = urlTextToShare, Images = images });
和我需要的是像下面的圖片
誰投下了這個問題請告訴我答案。 – 2014-08-28 07:19:48
你的問題含糊不清。你嘗試過什麼,它以什麼方式不起作用。發佈示例代碼。 – 2014-08-28 07:25:01
我不知道該怎麼做。這就是我在這裏問這個問題的原因。如果你想引用我的照片發佈代碼,請看我編輯的問題。 – 2014-08-28 08:34:18