谷歌加API得到最相册/ Vidoes [英] Google Plus APi Get photo Albums /Vidoes

查看:202
本文介绍了谷歌加API得到最相册/ Vidoes的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能获得谷歌加相册用户或页面。我能得到的活动(后/视频/照片)放在一起。

How can i get the Google Plus Photo Albums for a user or a page. i can get the activities(post/video/photo)all together.

这是在code我使用..

this is the code i'm using ..

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
                }
            }


        } 

此功能使活动源。我需要得到一个页面的所有专辑列表。

this function give the activity feeds. I need to get a list of all albums of a page.

我使用谷歌API-DOTNET客户 下载

I'm using "google-api-dotnet-client" downloads

推荐答案

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

The Google+ API doesn't support direct access to albums and photos yet. What you can use is the Picasa Web Albums Data API (since this is where the Google+ photos are stored) using the same Profile/Page ID that you would use to access the Google+ API. https://developers.google.com/picasa-web/

这篇关于谷歌加API得到最相册/ Vidoes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆