Reputation: 97
I've done a great deal of research on how to workaround Wordpress's iframe restrictions and I've been able to get it to work using various plugins with common services (google maps, youtube, etc.). However, all of these methods have not worked for embedding one of my published webApps. My most recent efforts have been using this plugin.
Here is an extremely simple 'Hello World' webApp that I would like to embed: LINK.
I was unable to simply use that URL as the 'src' for the iframe so I embedded the webApp in this google site then viewed the source of that iframe which I found to be:
<iframe src="https://sites.google.com/macros/s/AKfycbyAFo9aWOUw3FxiVZTGad6sgpcIbxZm1g9dS0yujV0tOBAI3582/exec?authuser=0&mid=ACjPJvEpRFnQA1LHa7qtEGta-zgj2r8oi_E2l-BUfSFUNBlxmagk2TXEd6msYIW1i7b4lfPTkEc9dZLm795dplLiaH7LZ3GchmiVtMYyXnBeeGhQ-NfS8a7-2n7NKzqPFibZ1fqr&bc=transparent&f=Georgia,+Times+New+Roman,+serif&tc=%23333333&lc=%230036b3" title="Apps Script Gadget" width="150" height="100" frameborder="0" scrolling="no" id="maestro_frame_1429669030"></iframe>
I then used that iframe code within the plugin's shortcode on the wordpress page and nothing is shown when published. The frame seems to be there but it's completely blank. When I try to view the frame source - it's blank. Please help?
I'm open to other ways to do this. I just need to somehow embed my published GAS webApps.
Upvotes: 1
Views: 14641
Reputation: 2257
To save others digging for this answer, it is possible by using setXFrameOptionsMode
:
https://developers.google.com/apps-script/reference/html/html-output#setxframeoptionsmodemode
Upvotes: 3
Reputation: 95
The Inline Google Spreadsheet Viewer doesn't work for Webapp. I think the only way to communicate with google app script from your own website is to use this solution :
https://www.youtube.com/watch?v=JRGzVdliQOQ
Take a look at this discussion :
https://code.google.com/p/google-apps-script-issues/issues/detail?id=852
App Script HTMLService App in iFrame
Upvotes: 1
Reputation: 857
The Inline Google Spreadsheet Viewer, despite the name, is a plugin for WordPress that can embed the output of any public Google Apps Script Web App without an iframe
.
Upvotes: 1