2

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.

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 gives the activity feeds. I need to get a list of all albums of a page.

I'm using google-api-dotnet-client.

Pang
  • 9,564
  • 146
  • 81
  • 122
MMALSELEK
  • 777
  • 6
  • 13
  • Can you show us what you have tried so far? – Surfbutler Jul 07 '12 at 08:20
  • this is the code i'm using now .. I have posted another question. since i have a error in the fetch() function. [link](http://stackoverflow.com/questions/11370362/an-item-with-the-same-key-has-already-been-added-google-plus) @Surfbutler – MMALSELEK Jul 07 '12 at 08:48

1 Answers1

3

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/

Scarygami
  • 15,009
  • 2
  • 35
  • 24
  • 1
    Here is a preview of the Google Plus images, albums and video api. It appears to be closely replicating the Picasaweb API. I'm glad to see that the domain for the media hosting and the url has not changed `(googleusercontent.com/accountid/userid/albumid/imageParams/filename)` http://siliconfilter.com/google-gets-an-api-for-photos-and-videos/ – Dylan Valade Mar 07 '13 at 18:06
  • Anyone know if this has changed yet? Seems like there's been some talk of a G+ API, but it's not clear whether videos are accessible through it yet or if Picasa is still the way to go. – Webreaper Feb 12 '15 at 13:15
  • Nope, no changes there yet, unfortunately. Picasa API is still the only way to access this information. – Scarygami Feb 12 '15 at 13:16
  • Still the same three years later. And we are fortunate that the Picasa API hasn't been deprecated yet. – mcont May 10 '15 at 10:53