能夠啓動的應用程序來創建會話,但登錄後應用程序中的LISDKSessionManager
succuess塊不會被調用無法在IOS爲LinkedIn創建登錄會話
[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];
}
];
是否調用了'errorBlock'?如果是的話,是否說錯誤? – Larme
沒有errorBlock不被調用 – Akshay0309