Picasa API not showing all google photos albums

989 views Asked by At

I am using Picasa API to show user's google photos albums in my site. I am using google's GData library. Here is my code:

PicasawebService service = new PicasawebService("MyApp");
service.setAuthSubToken("MyAccessToken");
Query query = generateQuery("https://picasaweb.google.com/data/feed/api/user/default");
query.setStringCustomParameter("kind", "album");
query.setMaxResults(1000);
UserFeed feed = service.getFeed(query, UserFeed.class);

Using this code I can see all of my albums - both old and new ones, but some users complain that they do not see all of their albums.

Any idea what can be the problem? Is it something in my code? or google photos isn't fully synced with picasa API?

Thanks.

2

There are 2 answers

3
Pete On BEST ANSWER

Any idea what can be the problem? Is it something in my code? or google photos isn't fully synced with picasa API?

It seems that this is a bug with the API. Albums created as "Shared Albums" don't appear in the API.

Steps to reproduce:

  1. From the https://photos.google.com, click Upload and upload a picture.
  2. In the popup shown after the image uploads, click Shared Album then New shared album and give it a name.
  3. Confirm that the album exists at https://photos.google.com/albums and is marked as Shared.
  4. Use the API to list your albums.

You'll find that the newly created album isn't visible via the API.

If you click Add to Album instead of Shared Album in step 2 above, the album will be visible via the API. If this unshared album is later shared, it remains visible. The problem only occurs if the album is shared when it is created.

0
Marc Cals On

The provided post is not working nowadays. One way to do it now is through google +.

  1. Go to google+
  2. Create a post and upload the photos that you want to share through picasa api and
  3. publish the post.
  4. Go to your home page google+ profile. In the new published post on the bottom left corner, you will see a "Show album" link, copy the link. It contains user id and album id accessible through picasa feeds.

Take into consideration that this is a hack that probably it gonna not work soon.