Here are the reasons why FBJS functions sometimes fail:
- xd_reciever.html is not installed correctly
- application key is not set in FB.init()
- Facebook Connect callback URL is not set in the application settings
- Facebook JavaScript API is not set correctly in your HTML. This should be set immediately after the body tag <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js" type="text/javascript"></script> This should be set before the closing body tag <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>
- Facebook functions are called before JavaScript objects are initialized. FB.init(api_key, channel_path); FB.ensureInit(function() { // put your functions here });
- All Facebook JavaScript functions are called BEFORE the FeatureLoader.js.php You should put your functions after this call and into FB.ensureInit() function
- There are JavaScript errors in your code
2 comments:
Thanks for the informative post! Slowly, but surely, good documentation on using the Stream is surfacing. Here is another helpful post with step-by-step instructions on setting up and using the Stream for iFrame apps: http://thetechnicalexperience.blogspot.com/2010/02/how-to-use-fbconnectstreampublish.html
Post a Comment