我可以從evernote API獲取筆記(真實內容,不僅僅是元數據)。但是,調用notestore-> update()總是會給我一個EDAMUserException。用Evernote Evernote更新Evernote筆記sdk
我的PHP代碼如下,該參數是不言自明的:
//add text to note
//if append=true then the text will be appended to the end, else it will be appended to the start
public function addToNote($new_content, $access_token, $note_store, $note_guid, $append = true){
$note = $note_store->getNote($access_token, $note_guid, true, false, false, false);
$note->content +="<en-note>Note updated</en-note>";
$note_store->updateNote($access_token, $note);
}
我已經做了很多之前,我在這裏問搜索,並在這裏被我知道的事情:
根據:https://dev.evernote.com/doc/articles/permissions.php它說有兩種類型的api鍵,一種是基本訪問權限,一種是完全訪問權限,我有完全訪問權限,這一點在$ note_store-> getNote( )調用,而且我確實輸出了來自該調用的數據,我實際上可以獲得該調用筆記的內容。
在與1相同的頁面中:「某些API函數僅適用於官方Evernote應用程序和服務,這些函數在API參考中被描述,並且如果被調用時會拋出EDAMUserException和錯誤代碼PERMISSION_DENIED第三方應用程序「。我在這裏閱讀API文檔:https://dev.evernote.com/doc/reference/NoteStore.html#Fn_NoteStore_updateNote 它沒有提到它在默認情況下被阻止。
更新注意絕對*不*第三方封鎖。你能打印出異常的errorCode和參數嗎?這些通常提供更多信息。 – akhaku