Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facebook ios sso getting "safari cannot open page" error

I've been developing an app for android and iphone, and been able to implement sso on android but when I try to implement it on iOS I get the above mentioned error :

"Safari cannot open the page because the address is invalid"

The error is shown after I click "okay" to give the permissions to my personal information on facebook to the app

the link in question is : m.facebook.com/dialog/oauth?refid=0

here is my info.plist file

<plist version="1.0">
<dict>
<key>CFBundleIconFiles</key>
<array>
    <string>icon.png</string>
    <string>[email protected]</string>
    <string>icon-72.png</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIdentifier</key>
<string>com.snizilica.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string></string>
<key>NSMainNibFile~ipad</key>
<string></string>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>[com.facebook.test]</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fb[xxxxxxxxxxxxxxx]</string>
        </array>
    </dict>
</array>

where xxxxxxxxxxx is my app_id

like image 288
Fatos Hoti Avatar asked Feb 16 '12 12:02

Fatos Hoti


People also ask

Why does my iPhone keep say Safari Cannot open the page?

The first thing you should do is check your internet connection, make sure it is active and enabled. This applies to Mac, iPhone, iPad, and anything really. If the device or computer is disconnected from the internet, you will see the “Safari Can't Open the Page” every time.

Why is it saying Safari Cannot open page?

Safari Can't Open the Page Error might occur due to many reasons such as a bad internet connection, damaged cookies, URL doesn't exist, etc, or it might be due to a server issue.

Why is Safari not connecting to server?

Change Your DNS Settings Safari uses your DNS settings to connect to websites. If there are issues with your DNS settings, it might be why you see the “Safari can't establish a secure connection to the server” message. To see if this is the case (and resolve it), you can try changing your DNS addresses.


1 Answers

Had the same problem. Solved it having removed the square brackets in the app id

               ...rfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fb123456789012345</string>
        </array>
    </dict>
</array>
</dict>
</plist>

dont use any square bracets around the app id

like image 92
igrek Avatar answered Oct 08 '22 23:10

igrek