diff --git a/IOSLinkedInAPI.podspec b/IOSLinkedInAPI.podspec index 226e1b9..bc35687 100644 --- a/IOSLinkedInAPI.podspec +++ b/IOSLinkedInAPI.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = 'IOSLinkedInAPI' - s.version = '0.0.1' + s.version = '0.0.2' s.license = 'MIT' s.summary = 'IOS LinkedIn API capable of accessing LinkedIn using oauth2. Using a UIWebView to fetch the authorization code.' s.homepage = 'https://github.com/jeyben/IOSLinkedInAPI' s.authors = { 'Jacob von Eyben' => 'jacobvoneyben@gmail.com' } - s.source = { :git => 'https://github.com/jeyben/IOSLinkedInAPI.git', :tag => '0.0.1' } + s.source = { :git => 'https://github.com/jeyben/IOSLinkedInAPI.git', :tag => '0.0.2' } s.source_files = 'IOSLinkedInAPI' s.requires_arc = true diff --git a/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.h b/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.h index bfd7119..4aa51d7 100644 --- a/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.h +++ b/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.h @@ -26,7 +26,7 @@ typedef void(^LIAAuthorizationCodeSuccessCallback)(NSString *code); typedef void(^LIAAuthorizationCodeCancelCallback)(void); typedef void(^LIAAuthorizationCodeFailureCallback)(NSError *errorReason); -static NSString *const LINKEDIN_CODE_URL_SUFFIX = @"&state=foobar"; +static NSString *const LINKEDIN_CODE_URL_SUFFIX = @"&state=%@"; static NSString *const LINKEDIN_CODE_URL_PREFIX = @"%@/?code="; diff --git a/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m b/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m index 339614f..4cd3611 100644 --- a/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m +++ b/IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m @@ -76,7 +76,7 @@ - (void)viewDidLoad { self.navigationController.navigationBarHidden = YES; - NSString *linkedIn = [NSString stringWithFormat:@"https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=%@&scope=%@&state=foobar&redirect_uri=%@", self.application.clientId, self.application.grantedAccessString, self.application.redirectURL]; + NSString *linkedIn = [NSString stringWithFormat:@"https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=%@&scope=%@&state=%@&redirect_uri=%@", self.application.clientId, self.application.grantedAccessString, self.application.state, self.application.redirectURL]; [self.authenticationWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:linkedIn]]]; } diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2361d68 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Ancientprogramming (http://www.ancientprogramming.com/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.