Skip to content

Instantly share code, notes, and snippets.

@d6veteran
Created December 16, 2010 17:42
Show Gist options
  • Save d6veteran/743713 to your computer and use it in GitHub Desktop.
Save d6veteran/743713 to your computer and use it in GitHub Desktop.
Init and Resize iFrame on Facebook Application Canvas Page
window.fbAsyncInit = function() {
FB.init({appId: '{{ facebook_app_id }}', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('{% if current_user %}auth.logout{% else %}auth.login{% endif %}', function(response) {
window.location.reload();
});
FB.Canvas.setAutoResize();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment