Creating a note in a Evernote linked notebook
Asked Answered
D

2

7

I have some issue creating a note in a linked notebook with the iOS evernote SDK.

I've tried to simply get the noteStore in question by

EvernoteNoteStore* noteStore = [EvernoteNoteStore noteStoreForLinkedNotebook:self.linkedNotebook];

I've then attempted to create a note with

[noteStore createNote:note success:success failure:^(NSError *error) {
        NSLog(@"%@", error);
    }];

This always ends in an error saying I don't have permission to create the note.

I have further tried to authenticate with the shared key in my linked notebook but have there also been stopped with the same error in the failure block.

[noteStore authenticateToSharedNotebookWithShareKey:self.linkedNotebook.shareKey success:^(EDAMAuthenticationResult *result) {
        [noteStore createNote:note success:success failure:^(NSError *error) {
            NSLog(@"%@", error);
        }];
    } failure:^(NSError *error) {
        NSLog(@"%@", error);
    }];

How can I go about the issue of creating a note in a linked notebook?

Diabolo answered 28/4, 2014 at 21:2 Comment(0)
F
0

OK. So if your permissions are correct, I guess there's an error in the process. I just published a blog post on this : http://laurent.sarrazin.io/2014/05/evernote-api-create-notes-in-a-linked-notebook.html It's in PHP but the process would be the same in other languages.

I guess you're not setting the notebook guid when creating the note. You can obtain this guid by calling the getSharedNotebookByAuth method. Don't use the linked notebook guid ! It would result in an EDAMNotFoundException.

Francyne answered 2/5, 2014 at 12:5 Comment(0)
F
-1

Are you sure that you have the right permissions ? i.e. write permissions on the notebook.

Francyne answered 28/4, 2014 at 21:42 Comment(1)
It's shared with 'modify and invite others' option. Which seems to be the highest permission I can share a notebook with.Diabolo

© 2022 - 2024 — McMap. All rights reserved.