gpt4 book ai didi

c# - Google Plus API 获取相册/视频

转载 作者:行者123 更新时间:2023-11-30 22:27:17 25 4
gpt4 key购买 nike

如何获取用户或信息页的 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 .

最佳答案

Google+ API 尚不支持直接访问相册和照片。您可以使用的是 Picasa 网络相册数据 API(因为这是存储 Google+ 照片的地方),它使用您用来访问 Google+ API 的相同配置文件/页面 ID。 https://developers.google.com/picasa-web/

关于c# - Google Plus API 获取相册/视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11370554/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com