如何获取用户或页面的 Google Plus 相册?我可以把活动(帖子/视频/照片)放在一起。
这是我正在使用的代码:
var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description);
provider.ClientIdentifier = GoogleIdentifier;
provider.ClientSecret = GoogleSecret;
ActivitiesResource.Collection collection = new ActivitiesResource.Collection();
var service = new PlusService();
service.Key = GoogleKey;
ActivitiesResource.ListRequest list = service.Activities.List(ProfileID, collection);
foreach (Activity activityFeed in list.Fetch().Items)
{
var title = activityFeed.Title;
foreach (Activity.ObjectData.AttachmentsData attachment in activityFeed.Object.Attachments)
{
if (attachment.ObjectType == "photo")
{
//add to list of photo
}
else if (attachment.ObjectType == "video")
{
//add to list of video
}
}
}
此功能提供活动提要。我需要获取页面所有专辑的列表。
我正在使用google-api-dotnet-client。