diff --git a/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m b/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m index 29df020..7490afb 100644 --- a/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m +++ b/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m @@ -106,7 +106,11 @@ - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *) if (accessDenied) { self.cancelCallback(); } else { - NSError *error = [[NSError alloc] initWithDomain:kLinkedInErrorDomain code:1 userInfo:[[NSMutableDictionary alloc] init]]; + NSString* errorDescription = [self extractGetParameter:@"error_description" fromURLString:url]; + NSError *error = [[NSError alloc] initWithDomain:kLinkedInErrorDomain + code:1 + userInfo:@{ + NSLocalizedDescriptionKey: errorDescription}]; self.failureCallback(error); } } else {