I'm trying to have a button in my VFP that'll add a Note (AttachedContentNote) to my custom object.
I want my button to do the same as the New Note button from the Note's relatedList in my custom object Salesforce default page. (I'm not talking about notes and attachment) 
This button is using this code onclick:
Sfdc.ChatterNotes.createNote(); I've included these js files (Don't even know if I do it right??? Is there a best practise on this?):
<script src="/EXT/ext-3.0.0/ext-core.js"/> <script src="/jslibrary/1487809120000/sfdc/Chatter.js"/> <script defer="true" src="/jslibrary/1487809120000/sfdc/ChatterDefer.js"/> When I click on my button that calls the Sfdc...createNote(). I get a popup that says: "The action you performed was invalid for your session. Please refresh your page and try again." 