Flickr's photostream is sorted by post date. Which bothers me much as I'd like to see my photostream sorted by taken date.
But flickr doesn't provide this option. So the only way to sort the photostream is setting the post date to taken date.
flickrj is a nice java flickr api. but it really costs me some time to understand how flickr's authentication process works. Below are the points:
1. create a Flickr object
2. create a FileAuthStore
3. check if there's any token in the FileAuthStore that you want to use.
4. If there is not:
4.1 create a Frob throw AuthInterface of Flickr
4.2 create a URL using frob
4.3 access the URL in your explorer to authorize this API key to access your photos with given permission
4.4 get token from the frob
4.5 set token to RequestContext
4.6 store the token in FileAuthStore
5. Access all photos and do the update.