{"action":"created","issue":{"url":"https://api.github.com/repos/jeyben/IOSLinkedInAPI/issues/55","repository_url":"https://api.github.com/repos/jeyben/IOSLinkedInAPI","labels_url":"https://api.github.com/repos/jeyben/IOSLinkedInAPI/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/jeyben/IOSLinkedInAPI/issues/55/comments","events_url":"https://api.github.com/repos/jeyben/IOSLinkedInAPI/issues/55/events","html_url":"https://github.com/jeyben/IOSLinkedInAPI/issues/55","id":76271713,"number":55,"title":"Authorization failed LinkedIn1: Error Domain=LIALinkedInERROR Code=1 \"The operation couldn’t be completed. (LIALinkedInERROR error 1.)\"","user":{"login":"daisoreanu","id":7915737,"avatar_url":"https://avatars.githubusercontent.com/u/7915737?v=3","gravatar_id":"","url":"https://api.github.com/users/daisoreanu","html_url":"https://github.com/daisoreanu","followers_url":"https://api.github.com/users/daisoreanu/followers","following_url":"https://api.github.com/users/daisoreanu/following{/other_user}","gists_url":"https://api.github.com/users/daisoreanu/gists{/gist_id}","starred_url":"https://api.github.com/users/daisoreanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daisoreanu/subscriptions","organizations_url":"https://api.github.com/users/daisoreanu/orgs","repos_url":"https://api.github.com/users/daisoreanu/repos","events_url":"https://api.github.com/users/daisoreanu/events{/privacy}","received_events_url":"https://api.github.com/users/daisoreanu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-05-14T07:48:08Z","updated_at":"2016-04-12T07:28:59Z","closed_at":"2015-05-20T10:33:22Z","body":"Hi, I am getting the next error:\r\n\r\n`Authorization failed LinkedIn1: Error Domain=LIALinkedInERROR Code=1 \"The operation couldn’t be completed. (LIALinkedInERROR error 1.)\"`\r\n\r\nwhen I tap a custom build LinkedIn button.\r\n\r\nHere is the code that I am using:\r\n\r\n```objective-c\r\n#pragma mark Linkedin integration\r\n- (void)suggestionsPopupLinkedInButtonFunction{\r\n    dispatch_async(dispatch_get_main_queue(), ^{\r\n    [_client getAuthorizationCode:^(NSString *code) {\r\n        [_client getAccessToken:code success:^(NSDictionary *accessTokenData) {\r\n            NSString *accessToken = [accessTokenData objectForKey:@\"access_token\"];\r\n            [self requestMeWithToken:accessToken];\r\n        }                   failure:^(NSError *error) {\r\n            NSLog(@\"Quering accessToken failed %@\", error);\r\n        }];\r\n    }\r\n                           cancel:^{\r\n        NSLog(@\"Authorization was cancelled by user\");\r\n    }\r\n                          failure:^(NSError *error) {\r\n        NSLog(@\"Authorization failed LinkedIn1: %@\", error);\r\n    }];\r\n    });\r\n}\r\n\r\n- (void)requestMeWithToken:(NSString *)accessToken {\r\n    [_client GET:[NSString stringWithFormat:@\"https://api.linkedin.com/v1/people/~:(skills)?oauth2_access_token=%@&format=json\", accessToken] parameters:nil success:^(AFHTTPRequestOperation *operation, NSDictionary *result) {\r\n        NSLog(@\"current user %@\", result);\r\n        //process the received result and convert it to string\r\n        NSString *skillFinalString = @\"\";\r\n        \r\n        for (int countValuesSize = 0; countValuesSize < [[[result objectForKey:@\"skills\"] objectForKey:@\"values\"] count]; countValuesSize++) {\r\n            NSString *skillValueString = [[NSString alloc] initWithString:[[[[[result objectForKey:@\"skills\"] objectForKey:@\"values\"] objectAtIndex:countValuesSize] objectForKey:@\"skill\"] objectForKey:@\"name\"]];\r\n            NSLog(@\"skillValueString = %@\", skillValueString);\r\n            if (countValuesSize < [[[result objectForKey:@\"skills\"] objectForKey:@\"values\"] count] - 1) {\r\n                \r\n                skillFinalString = [NSString stringWithFormat:@\"%@; \",[skillFinalString stringByAppendingString:skillValueString]];\r\n                \r\n            } else {\r\n                skillFinalString = [skillFinalString stringByAppendingString:skillValueString];\r\n            }\r\n            \r\n        }\r\n        //send the skillFinalString data to class variable and send them to server when finish/ done button is pressed\r\n        NSLog(@\"%@\", skillFinalString);\r\n        LinkedInInfo = skillFinalString;\r\n        NSLog(@\"%@\", skillFinalString);\r\n        \r\n        // Hide all social network Ui ellements from suggestion page\r\n        [self hideAllSocialPopupElements];\r\n        \r\n        //save the newlly retrived data to logedinUservCard\r\n        [logedinUservCard setObject:LinkedInInfo atIndexedSubscript:9];\r\n        [logedinUservCard setObject:[NSString stringWithFormat:@\"\"] atIndexedSubscript:1];\r\n        [self updatevCard];\r\n        \r\n    }        failure:^(AFHTTPRequestOperation *operation, NSError *error) {\r\n        NSLog(@\"failed to fetch current user %@\", error);\r\n    }];\r\n}\r\n\r\n- (LIALinkedInHttpClient *)client {\r\n    LIALinkedInApplication *application = [LIALinkedInApplication applicationWithRedirectURL:@\"http://www.newrosoft.com/\"\r\n                                                                                    clientId:@\"77ibz6e8ed8i53\"\r\n                                                                                clientSecret:@\"jkfPVSmEqGredwXO\"\r\n                                                                                       state:@\"DCEEFWF45453sdffef424\"\r\n                                                                               grantedAccess:@[@\"r_fullprofile\", @\"r_network\"]];\r\n    return [LIALinkedInHttpClient clientForApplication:application presentingViewController:nil];\r\n}\r\n\r\n```\r\n\r\nand also i declare:\r\n\r\n`LIALinkedInHttpClient     *_client;`\r\n\r\nwitch takes the value:\r\n\r\n`_client = [self client];`\r\n\r\nAlso I have opened a stack overflow [issue](http://stackoverflow.com/questions/30232359/ios-linkedin-api-error-while-trying-to-present-modal-view).\r\n"},"comment":{"url":"https://api.github.com/repos/jeyben/IOSLinkedInAPI/issues/comments/208753960","html_url":"https://github.com/jeyben/IOSLinkedInAPI/issues/55#issuecomment-208753960","issue_url":"https://api.github.com/repos/jeyben/IOSLinkedInAPI/issues/55","id":208753960,"user":{"login":"app3nak","id":18071698,"avatar_url":"https://avatars.githubusercontent.com/u/18071698?v=3","gravatar_id":"","url":"https://api.github.com/users/app3nak","html_url":"https://github.com/app3nak","followers_url":"https://api.github.com/users/app3nak/followers","following_url":"https://api.github.com/users/app3nak/following{/other_user}","gists_url":"https://api.github.com/users/app3nak/gists{/gist_id}","starred_url":"https://api.github.com/users/app3nak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/app3nak/subscriptions","organizations_url":"https://api.github.com/users/app3nak/orgs","repos_url":"https://api.github.com/users/app3nak/repos","events_url":"https://api.github.com/users/app3nak/events{/privacy}","received_events_url":"https://api.github.com/users/app3nak/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T07:28:59Z","updated_at":"2016-04-12T07:28:59Z","body":"I did as same as @iazarov and finally it worked thanks.."}}