这是我项目里面唯一的代码: public class Commanddd { [CommandMethod(“DoLL”)] public void Execute() { // 设置 Basic Auth 的用户名和密码 string username = “your_username”; string password = “your_password”; // 设置请求的 URL var options = new RestClientOptions(“https://api.twitter.com/1.1”) { Authenticator = new HttpBasicAuthenticator(“username”, “password”) }; var client = new RestClient(options); var request = new RestRequest(“statuses/home_timeline.json”); // The cancellation token comes from the caller. You can still make a call without it. var response = client.ExecuteAsync(request).Result; MessageBox.Show(response.Content); } }
这是我项目里面唯一的代码: public class Commanddd { [CommandMethod(“DoLL”)] public void Execute() { // 设置 Basic Auth 的用户名和密码 string username = “your_username”; string password = “your_password”; // 设置请求的 URL var options = new RestClientOptions(“https://api.twitter.com/1.1”) { Authenticator = new HttpBasicAuthenticator(“username”, “password”) }; var client = new RestClient(options); var request = new RestRequest(“statuses/home_timeline.json”); // The cancellation token comes from the caller. You can still make a call without it. var response = client.ExecuteAsync(request).Result; MessageBox.Show(response.Content); } }
您好,我发现并没有效果。但如果用autocad的话,同样的步骤,可以生效