我想在代码的帮助下关注 Twitter 上的用户。我正在使用下面提到的代码。
HttpWebRequest messageRequest =
(HttpWebRequest)WebRequest.Create("http://twitter.com/friendships/create/" +
userIdToFollow + ".xml?follow=true");
messageRequest.Method = "POST";
messageRequest.Credentials = new NetworkCredential(username, password);
messageRequest.ContentLength = 0;
messageRequest.ContentType = "application/x-www-form-urlencoded";
WebResponse response = messageRequest.GetResponse();
StreamReader sReader = new StreamReader(response.GetResponseStream());
responseStr = sReader.ReadToEnd();
我在收到回复时遇到错误
远程服务器返回错误:(404) Not Found。
我错过了什么吗?