【发布时间】:2013-07-16 02:11:48
【问题描述】:
我正在使用 Google API 我尝试插入时刻,但出现错误: Google.GoogleApiException 未处理 Message=发生错误,但无法反序列化错误响应 来源=Google.Apis 服务名称=任务
我的代码:
// 创建服务。
var service = new TasksService(new BaseClientService.Initializer()
{
Authenticator = auth
});
TaskLists results = service.Tasklists.List().Execute();
//it's work fine
Moment body = new Moment();
ItemScope target = new ItemScope();
target.Id = "replacewithuniqueforaddtarget";
target.Image = "http://www.google.com/s2/static/images/GoogleyEyes.png";
target.Type = "http://schemas.google.com/AddActivity";
target.Description = "The description for the activity";
target.Name = "An example of add activity";
body.Target = target;
body.Target.Url = "https://developers.google.com/+/web/snippet/examples/widget";
body.Type = "http://schemas.google.com/AddActivity";
MomentsResource.InsertRequest insert = new MomentsResource.InsertRequest(service, body, "me", MomentsResource.Collection.Vault);
Moment wrote = insert.Execute(); //error here
【问题讨论】:
-
它是 .net 应用程序
标签: google-plus