[annotator-dev] How to use AnnotateIt.org with Store plugin

Kunal Kadakia kadakiakunal at gmail.com
Tue Mar 6 04:48:35 UTC 2012

I am using the following code snippet:

jQuery(function ($) {
  	var content = $('#content').annotator().annotator('setupPlugins');

I am getting the following 2 errors in Google Chrome. I have
developing it on XAMPP on Mac OS X:

GET http://annotateit.org/api/token 401 (UNAUTHORIZED)
f.support.ajax.f.ajaxTransport.send (jquery-1.7.1.min.js:4)
f.extend.ajax (jquery-1.7.1.min.js:4)
b.Plugin.Auth.d.requestToken (annotator-full.min.js:1)
d (annotator-full.min.js:1)
c.addPlugin (annotator-full.min.js:1)
b.setupPlugins (annotator-full.min.js:2)
a.plugin.jQuery.fn.(anonymous function) (annotator-full.min.js:1)
e.extend.each (jquery-1.7.1.min.js:2)
e.fn.e.each (jquery-1.7.1.min.js:2)
a.plugin.jQuery.fn.(anonymous function) (annotator-full.min.js:1)
(anonymous function) (index.html:17)
f.Callbacks.n (jquery-1.7.1.min.js:2)
f.Callbacks.o.fireWith (jquery-1.7.1.min.js:2)
e.extend.ready (jquery-1.7.1.min.js:2)
c.addEventListener.B (jquery-1.7.1.min.js:2)

Couldn't get auth token: UNAUTHORIZED (annotator-full.min.js:1)
f.Callbacks.n (jquery-1.7.1.min.js:2)
f.Callbacks.o.fireWith (jquery-1.7.1.min.js:2)
w (jquery-1.7.1.min.js:4)
f.support.ajax.f.ajaxTransport.send.d (jquery-1.7.1.min.js:4)

Should I be passing any authentication tokens?

I would appreciate if atleast I could get this working.


On Mon, Mar 5, 2012 at 1:33 PM, Nick Stenning <nick at whiteink.com> wrote:
> That's exactly what the snippet I've given you does! Just try it. For
> further details of what the setupPlugins function does, see the
> following:
>  https://github.com/okfn/annotator/blob/master/src/plugin/kitchensink.coffee
> -N
> On Mon, Mar 5, 2012 at 18:30, Kunal Kadakia <kadakiakunal at gmail.com> wrote:
>> Yes, Nick! But, would the default setupPlugins store annotations on
>> annotateit.org. And, if so, how can I have them stored in my personal
>> annotateit.org account?
>> Thanks
>> Kunal
>> On Mon, Mar 5, 2012 at 1:27 PM, Nick Stenning <nick at whiteink.com> wrote:
>>> On Mon, Mar 5, 2012 at 18:07, Kunal Kadakia <kadakiakunal at gmail.com> wrote:
>>>> Hi dev-team,
>>>> [...snip...]
>>>> It would be good if someone could supply a working code snippet on how
>>>> to store annotations in my annotateit.org account. It would highly be
>>>> appreciated, as I have spent significant time in finding it.
>>> Hi Kunal,
>>> Did you see the two-liner on the front page of AnnotateIt.org =).
>>> (For reference, it's:
>>>    $('#content').annotator()
>>>                 .annotator('setupPlugins');
>>> )
>>> -N

More information about the annotator-dev mailing list