Scott S.
Scott S.

Reputation: 97

Embedding Google Apps Script WebApp in WordPress Page

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&amp;mid=ACjPJvEpRFnQA1LHa7qtEGta-zgj2r8oi_E2l-BUfSFUNBlxmagk2TXEd6msYIW1i7b4lfPTkEc9dZLm795dplLiaH7LZ3GchmiVtMYyXnBeeGhQ-NfS8a7-2n7NKzqPFibZ1fqr&amp;bc=transparent&amp;f=Georgia,+Times+New+Roman,+serif&amp;tc=%23333333&amp;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

Answers (3)

zorro2b
zorro2b

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

Edouard Delga
Edouard Delga

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

M12
M12

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

Related Questions