[annotator-dev] setting up with js to use annotate store

Rufus Pollock rufus.pollock at okfn.org
Thu Jun 21 08:15:26 UTC 2012

On 20 June 2012 22:54, Nick Stenning <nick at whiteink.com> wrote:
> On 2012-06-20 14:14, adam hyde wrote:
>> ok, it seems to work but strangley
>> http://www.booki.cc/fiddling-while-rome-burns/_draft/_v/1.0/why-this-book-was-written/
>> i copied the demo code exactly i think.
> The problem here is that when you load the annotations from the API
> you're getting the most recent public annotations, not just the
> annotations for your document (using the `loadFromSearch` option).
> Really, I think you're making this far more complicated than it needs to
> be by including the demo code. If you want AnnotateIt users to be able
> to annotate your document, it's two lines of code:
>    $('.content').annotator()
>                 .annotator('setupPlugins');
> If you want to use your own users, then it's four lines of code:
>    $('.content').annotator()
>                 .annotator('setupPlugins', {
>                   tokenUrl: 'http://example.com/getToken'
>                 });
> Just take the time to implement the token endpoint (something you'll
> have to do anyway -- as including the consumer key in the front-end is a
> big no-go) and all these problems will go away, I promise =).

Isn't it also possible just to have users log in to annotateit and
then you don't need this token endpoint?


More information about the annotator-dev mailing list