I have a JavaScript app which uses the Google Drive API. I read how to open a standard sharing dialog here: <https://developers.google.com/drive/web/manage-sharing>

```
<head>
...
<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('<MY_APP_ID>');
        s.setItemIds(["<MY_FILE_ID>"]);
    }
    window.onload = function() {
        gapi.load('drive-share', init);
    }
</script>
</head>
<body>
    <button onclick="s.showSettingsDialog()">Share</button>
</body>

```

Seems like I do everything right, when I click my `share` button, the dialog starts loading but it can't be loaded.

In the console I see:

```
Refused to display 'https://drive.google.com/share?...' in a frame
because it set 'X-Frame-Options' to 'SAMEORIGIN'.

```

I've googled this error and I've seen that there are some similar questions in SO and other sites, but they don't help. I guess Google doesn't allow itself to be in a frame in a not-google-site (cause of "SAMEORIGIN").

What can I do to open sharing dialog in my app?