Я пытаюсь сделать простой способ опубликовать твит в твиттере, ни больше, ни меньше.Я не могу найти достойный учебник или документацию, связанную с этим ... есть 10 библиотек для него, не могу понять, как использовать ни одну из них, даже не хочу беспокоиться об этом, если честно, Я просто хочуПОСТ ... Это то, к чему я стремлюсь, но оно не работает:
private void TweetBtn_Click(object sender, RoutedEventArgs e)
{
// Create a webclient with the twitter account credentials,which will be used to set the HTTP header or basic authentication
client = new WebClient { Credentials = new NetworkCredential { UserName = usernameTxtBox.Text, Password = password.Password } };
// Don't wait to receive a 100 Continue HTTP response from the server before sending out the message body
//ServicePointManager.Expect100Continue = false;
// Construct the message body
byte[] messageBody = Encoding.UTF8.GetBytes("status=" + messageTxtBox.Text);
// Send the HTTP headers and message body (a.k.a. Post the data)
client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted);
client.UploadStringAsync(new Uri("http://twitter.com/statuses/update.xml", UriKind.Absolute), messageTxtBox.Text);
}
Заранее спасибо:)