I have the exact same issue as simplyi has here. It appears he has never been answered and I couldn't find this question on this site so I figured I'd put it before this community.
For whatever reason, GphotoEntry works but a PhotoEntry returns nothing. I need to use the getMediaSource() method on the PhotoEntry; it's not available for GphotoEntry.
Here's my code (it has to be in a try-catch statement, but I've taken that out here). You'll noticed that I've comme开发者_JS百科nted out the line that works for me:
URL baseSearchUrl = new URL("https://picasaweb.google.com/data/feed/api/all");
Query myQuery = new Query(baseSearchUrl);
myQuery.setStringCustomParameter("kind", "photo");
myQuery.setMaxResults(10);
myQuery.setFullTextQuery("puppy");
AlbumFeed searchResultsFeed = myService.query(myQuery, AlbumFeed.class);
//for (GphotoEntry photo : searchResultsFeed.getEntries()) {
for (PhotoEntry photo : searchResultsFeed.getPhotoEntries()) {
System.out.println(photo.getTitle().getPlainText());
}
I appreciate your help
I came across the same problem.
Solution:
Once you add the photos-meta.jar
to your classpath, it should work.
Here is information source
For Android, u should use GPhoto, as for Java, u can use PhotoEntry or AlbumEntry.
Maybe Google update new version for Picasa Web Album API, So there are many new class here, GPhoto is the first one.
精彩评论