Add the dialog script
Add this script to launching page:
<OAUTH_TOKEN> should be replaced with the
authorized user's OAuth2 access token. Replace
<FILE_ID> with the id of the file to share.
Add a launch button
In the appropriate place in the body of your UI, add a line like the following:
When users click this button and
showSettingsDialog() is called, the script
handles displaying the dialog (which is modal).
For the dialog to work as expected, the user must be currently signed in to the Google account matching the identity of the oauth token.