diff --git a/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m b/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m index 7fa273e..76b8b6b 100644 --- a/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m +++ b/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m @@ -115,7 +115,7 @@ - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *) self.failureCallback(error); } } else { - NSString *receivedState = [self extractGetParameter:@"state" fromURL: requestURL]; + NSString *receivedState = [[self extractGetParameter:@"state" fromURL: requestURL] stringByReplacingOccurrencesOfString:@"#!" withString:@""]; //assert that the state is as we expected it to be if ([receivedState isEqualToString:self.application.state]) { //extract the code from the url