I have made an entire app and its functionality using html,css and Js. Then I use the WebViewer extension to display the app. I have placed a share button like this.
You need to set the webviewstring with the data/url you want to share, then collect this using the webviewstringChanged event in the AI2 app, and also then invoke sharing
for example (this for setting text in a web page, though)