title: PhoneGap & Facebook Connect - How to implement in a "domain-less" context?  [An Error Occurred..Please Try Again Later]
body: <p>I am using PhoneGap 2.0 for iOS and trying to get FB JS SDK working.  I'm loading the SDK asyncronously using the follow params:</p>
  
  <pre><code>        window.fbAsyncInit = function() {
              FB.init({
                  appId : 'xxxx', // App ID
                  status : true, // check login status
                  cookie : true, // enable cookies to allow the server to access the session
                  xfbml : true  // parse XFBML
              });   
          ....
  </code></pre>
  
  <p>I have a Facebook app tied to "localhost".  When I test the page using the XCode simulator or when opening up my index.html page in a browser (Firefox, Chrome, etc) from my filesystem, I get:</p>
  
  <p>"An error occurred with [APPNAME]. Please try again later."</p>
  
  <p>If I hit the same file through a local apache instance (localhost:8080/index.html) it works just fine.</p>
  
  <p>I noticed that the URL of the FB popup passes along your domain in the querystring.  On localhost:8080, it passes "domain=localhost".  But in Xcode and from the filesystem it passes "domain=" and gives the above error each time.</p>
  
  <p>Is there a correct way to either configure the FB app to work in a "domain-less" context, or would you setup the FB.init in a different manner? </p>