0
<html>
  <head>


    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">\
    <script type="text/javascript" src="https://apis.google.com/js/api.js"></script>
    <script type="text/javascript">

        init = function() {
        s = new gapi.drive.share.ShareClient('<YOUR_APP_ID>');

//JS でファイル ID を取得する方法は何ですか。ファイルを別のユーザーと共有したい s.setItemIds([""]); }

    window.onload = function() {

        gapi.load('drive-share', init);

    }


    </script>

  </head>

  <body>


      <button onclick="s.showSettingsDialog()">Share</button>

//showSettingDialog() の仕組み

  </body>
</html>
4

1 に答える 1

1

最初にFiles.list()を使用する必要があります。このページには、さまざまな言語のクイックスタート コードがあります。

次に、File Resourcesのリストが表示されます。File Resources の属性「id」は、必要なファイル ID です。

または、特定の Google ドキュメント ファイルで作業している場合は、URL にファイル ID が表示されます。

于 2013-06-06T15:38:22.440 に答える