我在使用 iOS evernote SDK 在链接的笔记本中创建笔记时遇到了一些问题。
我试图通过以下方式简单地获取有问题的 noteStore
EvernoteNoteStore* noteStore = [EvernoteNoteStore noteStoreForLinkedNotebook:self.linkedNotebook];
然后我尝试用
创建一个笔记[noteStore createNote:note success:success failure:^(NSError *error) {
NSLog(@"%@", error);
}];
这总是以错误结束,提示我没有创建笔记的权限。
我进一步尝试使用链接笔记本中的共享 key 进行身份验证,但是否也因失败 block 中的相同错误而停止。
[noteStore authenticateToSharedNotebookWithShareKey:self.linkedNotebook.shareKey success:^(EDAMAuthenticationResult *result) {
[noteStore createNote:note success:success failure:^(NSError *error) {
NSLog(@"%@", error);
}];
} failure:^(NSError *error) {
NSLog(@"%@", error);
}];
如何解决在链接的笔记本中创建笔记的问题?
最佳答案
好的。所以如果你的权限是正确的,我猜这个过程中有错误。 我刚刚发表了一篇关于此的博文:http://laurent.sarrazin.io/2014/05/evernote-api-create-notes-in-a-linked-notebook.html它是用 PHP 编写的,但在其他语言中该过程是相同的。
我猜你在创建笔记时没有设置笔记本 guid。您可以通过调用 getSharedNotebookByAuth 获取此 guid。方法。不要使用链接的笔记本 guid!它将导致 EDAMNotFoundException。
关于ios - 在 Evernote 链接笔记本中创建笔记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23351122/