如何使用c#从google plus获得所有帖子/活动
本文关键字:活动 何使用 google plus | 更新日期: 2023-09-27 18:17:31
我试图从google+墙上得到所有的帖子,但我只能得到20个帖子。请帮帮我。我的代码是-
PlusService plus = new PlusService(
new Google.Apis.Services.BaseClientService.Initializer()
{
ApiKey = "AIzaSyDWG1Ho6PVC6FlPXv5rommyzCAf0ziHkTo"
});
ActivitiesResource ar = new ActivitiesResource(plus);
ActivitiesResource.ListRequest list = ar.List(id, new ActivitiesResource.ListRequest.CollectionEnum());
ActivityFeed feed = list.Execute();
使用ListRequest
类的MaxResults
属性
PlusService plus = new PlusService(
new Google.Apis.Services.BaseClientService.Initializer()
{
ApiKey = "AIzaSyDWG1Ho6PVC6FlPXv5rommyzCAf0ziHkTo"
});
ActivitiesResource ar = new ActivitiesResource(plus);
ActivitiesResource.ListRequest list = ar.List(id, new ActivitiesResource.ListRequest.CollectionEnum());
list.MaxResults = 100; // Or whatever number you want
ActivityFeed feed = list.Execute();
注意,最大数目为100。
Google.Apis.Orkut.v2.ActivitiesResource。类引用