I'm using the Flickrj API to log into flickr. For READ only access its fine, but I can't seem to correctly auth when i need WRITE access to add tags to photos.
As i understand the basic auth flow
- Get a frob
- Pass that frob requesting WRITE access, this returns a URL.
- Call the URL to recieve a flickr token
- Use the token in all subsequent requests
My code currently is
Flickr f = new Flickr(properties.getProperty(APIKEY),properties.getProperty(SECRET),t);
System.out.println(f.toString());
// 1 get a frob
AuthInterface authInterface = f.getAuthInterface();
String frob = authInterface.getFrob();
System.out.println("first frob "+frob);
// 2 get a request URL
URL url = f.getAuthInterface().buildAuthenticationUrl(Permission.WRITE,frob);
System.out.println(url.toString());
// 3 call the auth URL
// 4 get token
f.getAuthInterface().getToken(frob);
As you can see - i'm stuck on step 3?