I also ran into the same problem. My mistake: Error Domain = LIALinkedInERROR Code = 2. On May 26, 2016 Linkedin again made some changes, due to which an additional "#!" are added to the state, and as a result, the state does not match in the LIALinkedInAuthorizationViewController class. So the solution is to remove these 2 characters either by replacing the string or by checking the string.
Another part of this method - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
change to `
NSString *receivedState = [[self extractGetParameter:@"state" fromURLString: url] stringByReplacingOccurrencesOfString:@"#!" withString:@""];
`or apply contains a string to match the state completely.
I know this is a strange solution, but it helped me. Hope this helps you. All the best

source share