flickr json rest call not working
Im using the flicker api on an iphone app, its working fine if I use the search method
NSString *urlString = [NSString stringWithFormat: @"http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=%@&tags=%@&per_page=15&format=json&nojsoncallback=1", FlickrAPIKey, text];
where text is the term to search for,, it works ok,
but when I want to look at my photo stream "nabe_fan" ; it doesn work!
here the json call Im using,
NSString *urlSt开发者_开发技巧ring = [NSString stringWithFormat:@"http://api.flickr.com/services/rest/?method=flickr.photos.getContactsPublicPhotos&api_key=%@&user_id=nabe_fan", FlickrAPIKey];
but it doesnt work with my user name:NataliaBetaFan or with the photostream:nabe_fan
I can check this in the browser too, where when using the user name, gives me user not found,
so How to construct the correct json call to show just the pics in my user, stream,,
thanks a lot!
edit>
solved! thanks to the below response, the call looks like this:
http://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&api_key=FLICKERKEY&user_id=66591366@N02&per_page=15&format=json&nojsoncallback=1
The user_id required is the NSID, not the Flickr username.
user_id (Optional)
The NSID of the user who's photo to search. If this parameter isn't passed then everybody's public photos will be searched. A value of "me" will search against the calling user's photos for authenticated calls.
Use flickr.urls.lookupUser to get the NSID first, then use the returned value in your user_id field.
精彩评论