Search code examples
javapicasagoogle-photos

Picasa API not showing all google photos albums


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.


Solution

  • 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.