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?

Moriya
  • 7,750
  • 3
  • 35
  • 53

2 Answers2

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.

-1

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

  • It's shared with 'modify and invite others' option. Which seems to be the highest permission I can share a notebook with. – Moriya Apr 28 '14 at 22:04