I wrote some code in Node.js to query for entries in a tag name in Reader, and that returns a list of items. But if I use the same URL in Java, it returns an empty list of items. The JSON does have the correct meta information but the items array is empty.
Here's my current code in Java to form the URL. I've tried several different variations and not had any luck. I do know that tagName has to be URL encoded.
String sUrl = "
https://www.google.com/reader/api/0/stream/contents/" + tagName + "?ck="
+ System.currentTimeMillis() + "&n=40&co=true&c=CKL2t6j30KICSPTQ3f2hhawC&client=exampleCo-exampleApp-1";
Querying on this URL works correctly
String sUrl = "
https://www.google.com/reader/api/0/tag/list?output=json&ck="
+ System.currentTimeMillis() + "&client=exampleCo-exampleApp-1";
It's the same code in both cases.
If it makes any difference I'm using ClientLogin to get an auth code. The URL is opened this way:
URLConnection connection = url.openConnection();
connection.setDoInput(true);
connection.setRequestProperty("Authorization", "GoogleLogin auth=" + token);
Thank you,
+ David Herron