开发者

How do I change the verification method when using the Google .net client library for Webmaster Tools?

开发者 https://www.devze.com 2023-01-06 07:32 出处:网络
var settings = new RequestSettings(\"appname\", \"googleusername\", \"googlepassword\"); var service = new WebmasterToolsRequest(settings);
var settings = new RequestSettings("appname", "googleusername", "googlepassword");
var service = new WebmasterToolsRequest(settings);
var site = new Sites("http://www.mysite.com", "text/plain");
Sites resultSite = service.AddSite(site);
resultSite.VerificationMethod.Type = "htmlpage";
resultSite.SitesEntry.Update();

.Update fails with a 400 (Bad Request).

Any ideas what I'm doing wrong?

ps. It almost seems easier to just code to the raw google api, this particular library seems to be like vb6, easy to do the easy things, hard to impo开发者_StackOverflow中文版ssible to the do the medium to hard things...

0

精彩评论

暂无评论...
验证码 换一张
取 消