From c571e505db6ca25bbcc5b390ad41b30f51a8b966 Mon Sep 17 00:00:00 2001 From: Luke Kazanis Date: Wed, 29 Mar 2017 12:44:48 +0300 Subject: [PATCH] WebView state fix --- IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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