tags:

views:

10

answers:

0

Hi!

I have problem getting Photo Next and Prev. links.

When a photo is displayed on the page I want to offer visitor to visit Next photo in album and Previous photo in album. Unfortunetly Picasa always returns me Null when calling getNextLink() or getPreviousLink() methods of PhotoFeed Entry. Please advise me.

Thank you!

Sample code is below:

String photoUrl = "http://picasaweb.google.com/data/feed/api/user/"+userName+"/albumid/"+albumId+"/photoid/" + photoId; URL feedUrl = new URL(photoUrl); PicasawebService myService = new PicasawebService("exampleCo-exampleApp-1"); myService.setOAuthCredentials(oauthParameters, new OAuthHmacSha1Signer());

    PhotoFeed photoFeed = myService.getFeed(feedUrl, PhotoFeed.class);          
    Link nextLink = photoFeed.getNextLink();
    Link prevLink = photoFeed.getPreviousLink();