title: Facebook iOS Safari "Cannot Open Page Error" When Authenticating User with Single-Sign-On
body: <p>I'm spinning in circles with this issue - and it looks like Facebook has some open tickets regarding it, but I wanted to see if anyone had the same issue I'm having and found a temporary or better solution.</p>
  
  <p>I downloaded Facebook's "DemoApp", and can put in my <code>appId</code> into its info.plist as so: <code>fb1234567890</code> (where 1234567890 is my appId).  It can authenticate the user by multitasking to Safari, entering my credentials, allowing my application access, and then redirecting back to "DemoApp" with me logged in (and I can request my information fine).</p>
  
  <p><strong>NOW, I'm trying to integrate DemoApp's functionality into my existing application.</strong></p>
  
  <p>I am able to access the login screen, and enter my credentials.  It allows me to give my application access to my personal information - I click <code>allow</code> and Safari processes a new request, and then returns the <strong>error message</strong>: <code>Safari cannot open the request because the address is invalid</code> at the URL: <code>http://www.facebook.com/connect/uiserver.php</code></p>
  
  <p>HOWEVER, If I have <code>DemoApp</code> installed on my simulator and my own application, it will switch BACK to DemoApp with my successfully logged in.  If I uninstall <code>DemoApp</code> and try again with my application, I get the Safari error.</p>
  
  <p><strong>WHAT CAN I DO TO SOLVE THIS??</strong>  Any help would be great; I'm banging my head here.:(</p>
  
  <p>My <code>info.plist</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;CFBundleURLTypes&lt;/key&gt;
      &lt;array&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleURLName&lt;/key&gt;
              &lt;string&gt;&lt;/string&gt;
              &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;fb1234567890&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/array&gt;
      &lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt;
      &lt;string&gt;English&lt;/string&gt;
      &lt;key&gt;CFBundleDisplayName&lt;/key&gt;
      &lt;string&gt;${PRODUCT_NAME}&lt;/string&gt;
      &lt;key&gt;CFBundleExecutable&lt;/key&gt;
      &lt;string&gt;${EXECUTABLE_NAME}&lt;/string&gt;
      &lt;key&gt;CFBundleIconFile&lt;/key&gt;
      &lt;string&gt;&lt;/string&gt;
      &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
      &lt;string&gt;com.yourcompany.${PRODUCT_NAME:rfc1034identifier}&lt;/string&gt;
      &lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
      &lt;string&gt;6.0&lt;/string&gt;
      &lt;key&gt;CFBundleName&lt;/key&gt;
      &lt;string&gt;${PRODUCT_NAME}&lt;/string&gt;
      &lt;key&gt;CFBundlePackageType&lt;/key&gt;
      &lt;string&gt;APPL&lt;/string&gt;
      &lt;key&gt;CFBundleSignature&lt;/key&gt;
      &lt;string&gt;????&lt;/string&gt;
      &lt;key&gt;CFBundleVersion&lt;/key&gt;
      &lt;string&gt;1.0&lt;/string&gt;
      &lt;key&gt;LSRequiresIPhoneOS&lt;/key&gt;
      &lt;true/&gt;
      &lt;key&gt;NSMainNibFile&lt;/key&gt;
      &lt;string&gt;MainWindow&lt;/string&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>