Reputation: 270
I'm trying to use the Google SDK file sharing dialog using the Javascript code described here: https://developers.google.com/drive/manage-sharing
I have an API key set up and have configured the Google Drive SDK panel as well: https://code.google.com/apis/console/
I can successfully list files stored on Google Drive using the API key and JavaScript but the sharing code does not work. A dialog that only contains a loading spinner appears and then it says "Sorry, sharing is unavailable at this time." and the Chrome Javascript console contains the error "Refused to display document because display forbidden by X-Frame-Options" in Chrome. In Firefox, I get the error:
Error: Error: Permission denied to access property '_EmailAc_create' Source File: docs.google.com/static/doclist/client/js/1880332762-v2-doclist_share__en_gb.js Line: 470
Any idea what is going wrong?
Upvotes: 1
Views: 727
Reputation: 27020
Ok, as nobody has been able to give you any advice at all, let me give you some low quality advice at least.
X-Frame-Options are used to prevent clickjacking attacks against an entire server by disallowing any pages with the specified header to be iframed. As far as I know google chrome lifts this restriction when the specified app is installed as a chrome web application, so probably your accompying web app isn't configured properly.
Additionally from another answer it could also have to do with your settings in the console apparently:
You need to make sure of 2 things:
- The "open with" URL that you have setup in your Google Drive SDK settings in the Google APIs Console has to have the same domain that the page where you are using the sharing dialog.
- Currently you alos need your application to be installed on your Google Drive for the embeddable widget to work.
Upvotes: 1