Stay organized with collections
Save and categorize content based on your preferences.
To allow users to share Drive files directly from your app, you can use the
Google Drive sharing dialog. This modal dialog is invoked
from your app to allow sharing of items on Drive. Figure 1 shows the Google Docs
Share button and the resulting sharing dialog.
To enable the Drive sharing dialog, add the dialog script and a launch button
or other launching mechanism to your UI.
Add the dialog script
To create an instance of the sharing dialog, add the following script to your
launching page:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-19 UTC."],[[["The Google Drive sharing dialog enables users to share Drive files directly from your application."],["To implement the dialog, you need to add a script that includes the authorized user's OAuth2 access token and the file ID."],["A launch button or mechanism in your UI, using the `showSettingsDialog()` function, triggers the sharing dialog."],["For proper functionality, ensure third-party cookies are enabled and the user is signed in with the Google account associated with the provided OAuth token."]]],[]]