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

标签 c# .net google-plus

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

相关文章:

c# - 网络浏览器字体大小(以像素为单位)

时间:2019-03-17 标签:c#app: Is it possible to implement a JSON interface?

google-plus - 发布 Google Plus 流

magento - Google Plus 分享按钮显示错误图像

c# - 构建后运行自动验收测试的框架?

c# - 由于 CORS,Angular 请求无法访问 API 控制

c# - XML Linq 新手问题

c# - XMLSerializer 序列化日期错误 : Is not a valid AllXsd

c# - 如何实现延迟位图加载?

google-plus - 了解 Google Plus 人员是否有真实照片