ios - 无法在 ios 中为 LinkedIn 创建登录 session

标签 ios objective-c linkedin-api

能够启动应用程序来创建 session ,但在登录到应用程序后,LISDKSessionManager 成功 block 未被调用

[LISDKSessionManager createSessionWithAuth:[NSArray arrayWithObjects:LISDK_FULL_PROFILE_PERMISSION, nil]
                                         state:nil
                        showGoToAppStoreDialog:YES
                                  successBlock:^(NSString *returnState) {
                                      if(returnState){
                                       NSLog(@"%s","success called!");

                                      }
                                      if (returnState) {
                                          [self updateControlsWithResponseLabel:YES];
                                      }
                                      // NSLog(@"%s","success called!");
                                      LISDKSession *session = [[LISDKSessionManager sharedInstance] session];
                                      NSLog(@"value=%@ isvalid=%@",[session value],[session isValid] ? @"YES" : @"NO");
                                      NSMutableString *text = [[NSMutableString alloc] initWithString:[session.accessToken description]];
                                      [text appendString:[NSString stringWithFormat:@",state=\"%@\"",returnState]];
                                      NSLog(@"Response label text %@",text);
                                      _responseLabel.text = text;
                                      self.lastError = nil;
                                      // retain cycle here?
                                      [self updateControlsWithResponseLabel:NO];

                                  }
                                    errorBlock:^(NSError *error) {
                                        NSLog(@"%s %@","error called! ", [error description]);
                                        self.lastError = error;
                                        //  _responseLabel.text = [error description];
                                        [self updateControlsWithResponseLabel:YES];
                                    }
     ];

最佳答案

最后注意linkedIn SDK登录只能在iPhone上使用,不能在iPad上使用

关于ios - 无法在 ios 中为 LinkedIn 创建登录 session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36643750/

相关文章:

node.js - LinkedIn OAUTH 本地主机失败,出现 "Refused to get unsafe header "X-CDN”

ios - 关于在 linkedin 中获取用户数据的问题

ios - TableView 的 UIView 无法滚动或点击

ios - 表格滚动时自动取消选中行

objective-c - 寻找有关如何调试 "message sent to deallocated instance"的指针

ios - Xcode 7.3 中用于目标的预处理器宏

objective-c - 需要 CCRenderTexture 来渲染更快的 ios

objective-c - 比较 Objective-C 中的版本号

iphone - 是否可以在iOS 6中自定义FaceBook PostView?

linkedin-api - 帖子预览在 Linkedin 上停止工作