Skip to content

Instantly share code, notes, and snippets.

@pierot
Created December 11, 2009 09:01
Show Gist options
  • Save pierot/254088 to your computer and use it in GitHub Desktop.
Save pierot/254088 to your computer and use it in GitHub Desktop.
import be.wellconsidered.social.facebook.events.FacebookBridgeEvent;
import be.wellconsidered.social.facebook.FacebookBridge;
private function init():void {
FacebookBridge.getInstance().addEventListener(FacebookBridgeEvent.RESULT, onFBResult, false, 0, true);
FacebookBridge.getInstance().init();
}
private function onFBResult(e:FacebookBridgeEvent):void {
trace("Response of " + e.func);
trace(FacebookBridge.getInstance().print_r(e.data));
}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="assets/js/FBFlashBridge-0.1.js" type="text/javascript"></script>
<script src="assets/js/json2.js" type="text/javascript"></script>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
var _fbFlashBridge;
$(document).ready(function() {
setTimeout(delayedInit, 500);
});
function delayedInit() {
fbFlashBridge = new FBFlashBridge("FBFlashBridge", "ab00ea694dbb0fcf4f1b23131678cd4a", "http://fbflashbridge.wellconsidered.be/xd_receiver.htm", swfobject.getObjectById("flash_flash"));
_fbFlashBridge.init();
_fbFlashBridge.addEventListener(_fbFlashBridge.LOGGED_IN, function(){
trace(_fbFlashBridge.isLoggedIn());
});
_fbFlashBridge.addEventListener(_fbFlashBridge.LOGGED_OUT, function(){
trace("Logged Out (" + _fbFlashBridge.isLoggedIn() + ")");
});
}
</script>
@pierot
Copy link
Author

pierot commented May 31, 2011

The latest FBFlashBridge (js) library can be downloaded here: https://gist.github.com/1000642

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment