Java flickrj PhotosetsInterface.getPhotos
我想我以前成功地使用过flickrj,但这次我被卡住了Java flickrj PhotosetsInterface.getPhotos,java,flickr,Java,Flickr,我想我以前成功地使用过flickrj,但这次我被卡住了 Flickr flickr = new Flickr("apikey"); PhotosetsInterface photosetInterface = flickr.getPhotosetsInterface(); PhotoList photos = null; try { photos = photosetInterface.getPhotos("setKey",
Flickr flickr = new Flickr("apikey");
PhotosetsInterface photosetInterface = flickr.getPhotosetsInterface();
PhotoList photos = null;
try {
photos = photosetInterface.getPhotos("setKey",10,1);
Iterator<Photo> itr = photos.iterator();
while(itr.hasNext()){
Photo photo = (Photo) itr.next();
out.println("the url of the photo is "+photo.getTitle()+"<br/>");
}
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FlickrException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
我能够与端点联系并获取设置列表,因此我真的不知道为什么签名无效。找到问题,您必须使用Flikcr构造方法提供密钥:
Flickr flickr = new Flickr("apikey","secretkey");
我发现这里的这些示例对于开始使用FlickRJAPI非常有用
Flickr flickr = new Flickr("apikey","secretkey");