Evernote php cloud sdk Update note contents and note tag Names

113 Views Asked by At

I am facing problem in php cloud sdk to get note tags. I can get tag guids but can't find real tags (tag names).

I am also facing problem in updating notes content (append new text to existing note).

        $note_store=$this->evernote->getUserNotestore();

        $note = $note_store->getNote($accessToken, $results[0]->guid, true, false, false, false);
    
        $note->content='<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div>'.$content.'</div><div> new Contents Here </div></en-note>';
;

        //$note->content = new \Evernote\Model\PlainTextNoteContent($content."<br> New message to append.");

        $res=$note_store->updateNote($this->profile['sSocialToken'], $note);

        echo "<pre>",print_r($res);die();
1

There are 1 best solutions below

3
On

If you have tag guids, you can use NoteStore#getTag. For the note content update, I'm not sure about what error you've got so I don't exactly know what the problem is. If you get an EDAM error with authentication token, you are using the wrong one. Otherwise, what you should be looking at is probably the note content format. Here's the doc for that.