Saturday, March 31, 2012

Using Hangout API in GWT

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 


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/RXabfwELZGoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment