thobson
11-12-2008, 05:40 AM
I'm developing a facebook application using OL 3.3.3. Facebook say I can make calls to the host browser via a LocalConnection object but their sample code is written in AS2/3. Could anyone give me any pointers for using this within OL? Here is the relevant section of their docs (http://wiki.developers.facebook.com/index.php/Fb:fbjs-bridge):
var connection:LocalConnection = new LocalConnection();
var connectionName:String = _root.fb_local_connection;
function callFBJS(methodName:String, parameters:Array):Void {
if (connectionName) {
connection.send(connectionName, "callFBJS", methodName, parameters);
}
}
callFBJS("document.setLocation", ["http://someurl"]);
I was hoping to do something like:
var connection = new LocalConnection();
var socketName = global.fb_local_connection;
connection.send(socketName, "callFBJS", "document.setLocation", "http://www.google.com");
But this doesn't seem to work (I dont get any errrors - nothing happens)
Thanks
Toby
var connection:LocalConnection = new LocalConnection();
var connectionName:String = _root.fb_local_connection;
function callFBJS(methodName:String, parameters:Array):Void {
if (connectionName) {
connection.send(connectionName, "callFBJS", methodName, parameters);
}
}
callFBJS("document.setLocation", ["http://someurl"]);
I was hoping to do something like:
var connection = new LocalConnection();
var socketName = global.fb_local_connection;
connection.send(socketName, "callFBJS", "document.setLocation", "http://www.google.com");
But this doesn't seem to work (I dont get any errrors - nothing happens)
Thanks
Toby