Using Hangout API in GWT

296 views
Skip to first unread message

Sea

unread,
Mar 31, 2012, 3:50:39 AM3/31/12
to google-we...@googlegroups.com
I am in the middle of a problem to add Hangout API into my collaboration web application written in GWT.
Since Hangout API only allows to be run on only http://plus.google.com domain,
the GWT compiled javascript which hosted on my domain can not be injected into a hangout instance by the GWT's script iframe injection method due to security rule of browsers.
For illustration,  The following is a sample web app at http://kobkrit-salang.appspot.com.

The gray hilight text at the half-bottom of the screen is the iframe added by GWT to inject the compiled Javascript.


I using the following XML file for Hangout API


When running it with Hangout instance, My web application could not be run, it encounters with the following problem.


4Unsafe JavaScript attempt to access frame with URL https://6nlt194vs7651884mb611iih4ren87ah-a-hangout-opensocial.googleusercontent.com/gadgets/ifr?url=app%3A//711346462244/hangout&container=hangout&view=default&lang=all&country=ALL&debug=0&nocache=1&sanitize=0&v=f8dd7cb5420f9259&testmode=0&parent=https%3A//hangoutsapi.talkgadget.google.com&mid=0&authuser=0&hl=en#st=e%3DABul2V1sl1lc6NLQxflEyV%252BvhFi%252Fe3nCEI4bJ%252Bqw7leMqzl7%252Fp5rg8QD5koyJ%252FmsyzhSz8wDU%252BT0txZz6SS%252BvCBjnOW3yG9YMYqFnCQduW9yng5%252FyVflXcAGyBEsld%252FK%252BtJ5otg9ocz4%26c%3Dhangout from frame with URL https://kobkrit-salang.appspot.com/simplegwt/9649FA6CE155A9D18D7B7F35499CCDCC.cache.html. Domains, protocols and ports must match.


Without iframe method, Is there is method in GWT to change the way to injecting its javascript file? 
or There are any methods to solve this? It is very appreciated.


Thank you very much!

Kobkrit Viriryayudakorn 


Thomas Broyer

unread,
Mar 31, 2012, 5:46:34 AM3/31/12
to google-we...@googlegroups.com
This is why the xsiframe linker is for (and previously, the xs linker, which is now deprecated); simply add that to your gwt.xml:
<add-linker name="xsiframe" />
Reply all
Reply to author
Forward
0 new messages