I currently have a hangout application and I'd like to add some collaborative functionality to it given the realtime API.

Following the realtime API quickstart guide (adding two text areas and a button to authorize with), I've added the relevant code to the hangout XML module(Is this the correct name for this?)

It looks like, however, whenever I click the "authorize" button from within the google hangout instance, the page might refresh (or something?) and a GET request comes back with a: 400 (Bad Request) response.

Is there something I've overlooked? Perhaps, some documentation I missed? Is there a better approach to what I'm trying to accomplish?

EDIT: More information on the GET request and response from chrome's javascript console:

https://015isqam6kq3vfnd0h572bpk4rvnem82-a-hangout-opensocial.googleusercon…dgets/ifr?fileId=0B2FRfMTFpkH0S3RDUlhDMWNsbjQ&userId=103345858281489162915 400 (Bad Request) 015isqam6kq3vfnd0h572bpk4rvnem82-a-hangout-opensocial.googleusercontent.com…ets/ifr?fileId=0B2FRfMTFpkH0S3RDUlhDMWNsbjQ&userId=103345858281489162915:1

The page (where the hangout content should be) then shows:

"Missing or malformed url parameter"

有帮助吗?

解决方案

The problem lies in the realtime-client-utils.js that the documentation provides.

The idea with the authorization is that upon authorization, it tries to redirect the page via window.location.href and adds parameters to the end of the URL.

Removing the redirect, setting the parameters in the parameters object manually, and restarting the authorization process fixes the problem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top