Take the 2-minute tour ×  I'm creating an app for windows 8 that
involves facebook integration. I know you can't load in external
javascript so I stuck an iframe as the very first element which
linked to a file that linked to the facebook sdk. My DOM
explorer seems to tell me that that loads fine  Despite having a
$(document).ready(function() {  around my FB.login function
(which is below window.fbAsyncInit), I'm being told that 'FB' is
undefined.  Some notes: - Login is only invoked after the user
presses a button - Works fine online - My JS code..
window.fbAsyncInit = function() {     appId      : 'APP ID', //
App ID     channelUrl : '//url', // Channel File     status
: true, // check login status     frictionlessRequests : true,
// enable frictionless requests             xfbml      : true
// parse XFBML   FB.getLoginStatus(function(response) {
function goLogIn() {   $(document).ready(function () {
FB.login(function(response) {     }, {scope:
'user_photos,friends_photos,publish_stream',}); //F