BluesZhang / gdata-objectivec-client

Automatically exported from code.google.com/p/gdata-objectivec-client
Other
0 stars 0 forks source link

getting too_many_results_requested error when doing a search with the Objective-C library #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. try doing a search using GDataServiceGooglePhotos fetchFeedWithURL with
the following URL:
http://picasaweb.google.com/data/feed/api/all?q=cat&max-results=200

Here's the code that I'm using to make the call (where "url" is the URL
shown above):
GDataServiceGooglePhotos *service = [[UIApplication
sharedApplication].delegate googlePhotosService];
[service fetchFeedWithURL:[NSURL URLWithString:url]
  delegate:self
  didFinishSelector:@selector(photosTicket:finishedWithFeed:error:)];

What is the expected output? What do you see instead?
I expected to see 200 results for photos that match the search term "cat".
Didn't get back any data, only an error message saying
too_many_results_requested

What version of the product are you using? On what operating system?
Using the GData Objective-C library (specifically, Common, Contacts, and
Photos)

Please provide any additional information below.
It doesn't matter what I put in max-results, I get the same error every
time. Also, I should note that the user is authenticated.

Original issue reported on code.google.com by wut...@gmail.com on 24 May 2010 at 9:16

GoogleCodeExporter commented 9 years ago
Seems to work as expected for me.

You probably have shouldFollowNextLinks turned on for the service. That doesn't 
make sense when fetching 
search results from public sources, where there are far too many results. Try 
turning off following for the ticket:

      [ticket setShouldFollowNextLinks:NO];

Original comment by gregrobbins on 24 May 2010 at 9:36

GoogleCodeExporter commented 9 years ago
Wow, thanks, Greg! That worked for me! I don't quite understand yet what
setServiceShouldFollowNextLinks does yet but I'll look around -- I might be 
able to
turn that off for all feed requests.

Thanks again!

Original comment by wut...@gmail.com on 24 May 2010 at 9:46

GoogleCodeExporter commented 9 years ago
In the documentation wiki,

http://code.google.com/p/gdata-objectivec-client/wiki/GDataObjCIntroduction#Goog
le_Data_APIs_Basics

look for the discussion of a feed's next link.

Original comment by grobb...@google.com on 24 May 2010 at 9:59