Could not deliver message system.getService to unavailable service: auth

22 views
Skip to first unread message

bobzsj87

unread,
Aug 8, 2012, 4:36:55 AM8/8/12
to bridge...@googlegroups.com
Hello,

I am following the getting start docs online, and only found clips of codes, and I pasted to my page and got the "Could not deliver message system.getService to unavailable service: auth" error. Here is my code in index.html. I am trying to test out this "helloworld" code.

bridge = new Bridge({apiKey:'my public api key'});
 
var chatHandler = {
  message
: function(sender, message) {
    console
.log(sender, ':', message);
 
}
};


var joinCallback = function(channel, name) {
  console
.log('Joined channel : ', name);


 
// The following RPC call will succeed because client was joined to channel with write permissions
  channel
.message('steve', 'Can write to channel:' + name);
};


bridge
.getService('auth', function(auth){
  auth
.joinWriteable("bridge-lovers", "secret123", chatHandler, joinCallback);
});


bridge
.connect();

Anyone knows what's causing this? Really at lost. Thanks in advance.
Reply all
Reply to author
Forward
0 new messages