Created
December 11, 2009 09:01
-
-
Save pierot/254088 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The latest FBFlashBridge (js) library can be downloaded here: https://gist.github.com/1000642