Get all photos from Picasa by person

十年热恋 提交于 2019-12-10 11:03:41

问题


Is it possible to get all photos by a persons name through the Picasa Web Albums Data API?

All examples I can find, shows how to get photos by an albumid.


回答1:


You can request a list of the most recent photos, with a very high value for max-results.

I'm not sure if you are using the .NET API Client Library, but if so, an example is here: http://code.google.com/apis/picasaweb/docs/1.0/developers_guide_dotnet.html#ListRecentPhotos

Use query.NumberToRetrieve to set the value for max-results.

If you are not using the .NET Client Library, an example using HTTP protocol can be found here: http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html#ListRecentPhotos




回答2:


You can check this article at http://codehelp.smartdev.eu/2011/05/31/asp-net-google-api-authentication-using-clientlogin-for-installed-applications/. It is a good example on how you can list all albums and images for a user (both public and private).




回答3:


You can retrieve facial recognition data from the Picasa Web API through a (currently) undocumented API URL that is used by the Picasa desktop application. More info here:

http://klick.com/pharma/blog/2011/09/retrieving-face-tag-data-from-the-picasa-web-api/




回答4:


by setting "default" that mean retrieving current user with that code you can retrive the user photos in specific album

PhotoQuery query = new PhotoQuery(PicasaQuery.CreatePicasaUri("default", albumId));
        PicasaFeed feed = picasaService.Query(query);

        foreach (var entry in feed.Entries)
        {
            PhotoAccessor photoAccessor = new PhotoAccessor((PicasaEntry)entry);
            Photo photo = new Photo();

            photo.Title = photoAccessor.PhotoTitle;
            photo.Summary = photoAccessor.PhotoSummary;
            photo.MediaUri = entry.Content.AbsoluteUri;
            photo.Id = photoAccessor.Id;
            photo.AlbumId = photoAccessor.AlbumId;

            photos.Add(photo);
        }



回答5:


If you know the subjectid then using an RSS link you can get a feed of ALL images for that user regardless of albums. The link is:

http://picasaweb.google.com/data/feed/base/user/PICASA_USERNAME?alt=rss&kind=photo&subjectids=SOME_BIG_LONG_STRING_OF_CHARACTERS

Also, you can find the subjectids by going to each person on PWA and clicking the RSS link at the bottom of the page.

I am stil trying to find a way to get all subjectids without a manual lookup.

Source: http://credentiality2.blogspot.com/2010/02/picasa-gdata-api-and-face-recognition.html



来源:https://stackoverflow.com/questions/4564997/get-all-photos-from-picasa-by-person

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!