• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ios - 使用 Linkedin SDK iOS 登录

[复制链接]
菜鸟教程小白 发表于 2022-12-13 16:05:58 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我已经为登录过程实现了linkedin-sdk。在开发者帐户上创建 key 。以下是代码:

    [LISDKSessionManager createSessionWithAuth:permissions state:nil showGoToAppStoreDialog:YES successBlock:^(NSString *returnState){
            NSLog(@"%s","success called!");
            LISDKSession *session = [[LISDKSessionManager sharedInstance] session];
            NSLog(@"Session  : %@", session.description);
            }];
        } errorBlock:^(NSError *error) {
            NSLog(@"Error called  : %@", error);
        }];


func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any]) -> Bool {

 print("url..",url)

if LISDKCallbackHandler.application(app, open: url, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String?, annotation: options[UIApplicationOpenURLOptionsKey.annotation]) {
            return true
        }
}

url... li4366914://error?state=(null)&info=INVALID_APP_ID&domain=LISDKInvalidRequestError&description=Invalid%20Application%20ID

它转到 Linkedin 应用程序 Linkedin authentication但是当它回到应用程序时,显示无效 session 。找不到原因。浪费了几个小时。如果有人了解此错误,请帮助我。

谢谢!



Best Answer-推荐答案


LinkedIn SDK 已被弃用。

The Mobile SDK is not currently supported. Learn more

Ref: https://developer.linkedin.com/docs/ios-sdk

“了解更多”将您带到 LinkedIn 的 Developer Program Updates其中指出:

Changes to the program include:

  • APIs: Developers must migrate their apps to our new APIs.
    • Sign In with LinkedIn: Sign In with LinkedIn enables members to choose a more convenient way to log-in to third party apps and allows those apps to learn more about their new user. This API will only recognize a new “Lite Profile” permission, which supports a reduced set of member profile fields. See the documentation for more details.

...

  • Authentication, SDKs, and Plugins: We are also deprecating several obsolete or seldomly-used products and technologies.

    • Authentication: We will sunset OAuth 1.0 and require all developers to use OAuth 2.0, which we have supported since 2013. OAuth 2.0 is the industry standard and widely-used by the majority of people building on our platform.

    • SDKs: Our JavaScript and Mobile Software Development Kits (SDKs) will stop working. Developers will need to migrate to using OAuth 2.0 directly from their apps.

...

To reiterate: all developers need to migrate their apps to our newest APIs and OAuth 2.0 by March 1, 2019. To help navigate the migration process, please see the technical migration guide on the LinkedIn section of the Microsoft Docs website.

Ref: https://engineering.linkedin.com/blog/2018/12/developer-program-updates


总结:

SDK 很旧,不再维护。它一定是使用了已被丢弃的旧 API,我想这就是为什么即使您正确设置项目,SDK 也无法按预期工作。

选项:

关于ios - 使用 Linkedin SDK iOS 登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55184816/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap