OGeek|极客世界-中国程序员成长平台

标题: ios - 使用 Linkedin SDK iOS 登录 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 16:05
标题: ios - 使用 Linkedin SDK iOS 登录

我已经为登录过程实现了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:

...

...

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/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4