【问题标题】:ios redirect to parent window after authenticationios认证后重定向到父窗口
【发布时间】:2014-03-16 21:31:28
【问题描述】:

我正在通过第三方 api http://api.kliqmobile.com/v1/auth/facebook 登录 facebook

我的日志记录代码

-(void)loginForFaceBook
{
    NSString *strMediaIconUrl = @"api.kliqmobile.com/v1/auth/google";
    NSString *strurl = [NSString stringWithFormat:@"http://%@",strMediaIconUrl];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:strurl]];
}

此代码在viewconrollerA 中单击按钮时执行。 我想要的是,在浏览器中进行身份验证后到viewcontrollerA

API 文档中提到了这样的重定向

在认证和授权 KLIQ 访问地址后 book,用户将被重定向到我们的回调 URL 代码参数中的临时代码:

GET /auth/:id/callback

id 可以是 google、twitter、facebook、yahoo 或 linkedin 之一

完整网址示例:GET https://api.kliqmobile.com/v1/auth/twitter

此回调存储用户的访问令牌,以及一个后台进程 开始同步通讯录中的所有联系人 社交网络进入 KLIQ。

但我不知道该怎么做?

【问题讨论】:

    标签: ios objective-c


    【解决方案1】:

    我认为您需要指定应用程序的“回调”url,浏览器可以在身份验证后重定向身份验证参数。 阅读 api 的文档,其中必须提到您需要在 info.plist 中指定的回调和“url-types”。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-05
    • 2011-02-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-19
    • 1970-01-01
    相关资源
    最近更新 更多