I used the article from MSDN:
Use the client-side People Picker control in SharePoint-hosted SharePoint Add-ins.
It's working perfect on a page in the site, not related to any app. Now I want to implement it in the "share invitation" dialog, to set the schema to the exiting people picker or to hide the existing people picker and add a new one instead.
But it's not working, I'm getting error:
Cannot read property 'SPClientPeoplePicker_InitStandaloneControlWrapper' of undefined.