Facebook iOS Safari“无法打开页面错误"使用单点登录对用户进行身份验证时 [英] Facebook iOS Safari "Cannot Open Page Error" When Authenticating User with Single-Sign-On

查看:31
本文介绍了Facebook iOS Safari“无法打开页面错误"使用单点登录对用户进行身份验证时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在讨论这个问题 - 看起来 Facebook 有一些关于它的公开票,但我想看看是否有人遇到了我遇到的同样问题并找到了临时或更好的解决方案.

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.

我下载了 Facebook 的DemoApp",并且可以将我的 appId 放入它的 info.plist 中,如下所示:fb1234567890(其中 1234567890 是我的 appId).它可以通过对 Safari 进行多任务处理来验证用户身份,输入我的凭据,允许我的应用程序访问,然后在我登录的情况下重定向回DemoApp"(我可以很好地请求我的信息).

I downloaded Facebook's "DemoApp", and can put in my appId into its info.plist as so: fb1234567890 (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).

现在,我正在尝试将 DemoApp 的功能集成到我现有的应用程序中.

我可以访问登录屏幕,并输入我的凭据.它允许我让我的应用程序访问我的个人信息 - 我单击 allow 并且 Safari 处理一个新请求,然后返回错误消息:Safari 无法打开请求,因为地址无效在 URL:http://www.facebook.com/connect/uiserver.php

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 allow and Safari processes a new request, and then returns the error message: Safari cannot open the request because the address is invalid at the URL: http://www.facebook.com/connect/uiserver.php

但是,如果我的模拟器和我自己的应用程序上安装了 DemoApp,它会在我成功登录后切换回 DemoApp.如果我卸载 DemoApp 并尝试再次使用我的应用程序,我收到 Safari 错误.

HOWEVER, If I have DemoApp installed on my simulator and my own application, it will switch BACK to DemoApp with my successfully logged in. If I uninstall DemoApp and try again with my application, I get the Safari error.

我能做些什么来解决这个问题??任何帮助都会很棒;我在这里敲我的头.:(

WHAT CAN I DO TO SOLVE THIS?? Any help would be great; I'm banging my head here.:(

我的info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLName</key>
            <string></string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>fb1234567890</string>
            </array>
        </dict>
    </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></string>
    <key>CFBundleIdentifier</key>
    <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</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>MainWindow</string>
</dict>
</plist>

推荐答案

CFBundleURLTypes 条目不正确.它应该是这样的:

The CFBundleURLTypes entry is incorrect. It should look like this:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fb1234567890</string>
        </array>
    </dict>
</array>

这篇关于Facebook iOS Safari“无法打开页面错误"使用单点登录对用户进行身份验证时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆