能够启动应用程序来创建 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/