我已经为登录过程实现了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 应用程序 但是当它回到应用程序时,显示无效 session 。找不到原因。浪费了几个小时。如果有人了解此错误,请帮助我。
谢谢!
LinkedIn SDK 已被弃用。
The Mobile SDK is not currently supported. Learn more
“了解更多”将您带到 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/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://jike.in/) | Powered by Discuz! X3.4 |