6

I've done a decent amount of research on the unofficial reader api and sifted through other questions, but none of them quite have what I want. How to share an article if you know the article id is well documented, but I want to know how to share an article if you don't know the id (i.e. how to transform url -> id or how to share directly using the url as a parameter).

I imagine it is possible, because the functionality pretty much mimics the behavior of the awesome "Note in Reader" bookmarklet they have.

Thanks!

Shog9
  • 156,901
  • 35
  • 231
  • 235
G Ullman
  • 237
  • 1
  • 3
  • 7

1 Answers1

4

The "Note in Reader" bookmarklet ends up sending a POST to http://www.google.com/reader/api/0/item/edit with these parameters:

  • client: your client ID
  • T: action token
  • url: item url
  • title: title (interpreted as plain text)
  • snippet: body (interpreted as HTML)
  • share: true or false
  • tags: additional tag to apply to the created note, e.g. user/-/label/foo (optional, repeat the parameter if you wish to add mutliple tags)
  • srcUrl: URL of the source site
  • srcTitle: title of the source site
Mihai Parparita
  • 4,236
  • 1
  • 23
  • 30
  • Thanks, I'd actually come across that before in the context of people adding buttons to their own blogs. I assume reader just generates a snippet with javascript then. – G Ullman Feb 15 '11 at 16:32
  • 1
    http://www.google.com/support/reader/bin/answer.py?hl=en&answer=147149 mentions similar parameters, but that's for generating the "Note in Reader" form. The POST request above bypasses that and creates the shared item directly. – Mihai Parparita Feb 16 '11 at 04:32
  • 1
    Did the above parameters changed lately? I've googled the same issue, and it seems like everybody is now getting a "401 Unauthorized" Error right now.. Which I also get, though I'm authorized (have a SID and a token), any idea what happened? – Shady M. Najib Apr 20 '11 at 07:33
  • 1
    @Shady: SID cookies are no longer supported for API authentication (see http://groups.google.com/group/fougrapi/browse_thread/thread/e331f37f7f126c00 and http://code.google.com/p/google-reader-api/wiki/Authentication for more details, and feel free to post in that group if you still have trouble). – Mihai Parparita Apr 22 '11 at 04:38
  • Thanks a lot, I'll be testing it soon, I just tried to search the group before and got another post that didn't lead me anywhere and thought it was something wrong with my code.. Thanks once more :) – Shady M. Najib Apr 26 '11 at 13:41