Skip to content

Commit

Permalink
Updated GET method for AFNetworking 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bachonk committed Aug 2, 2014
1 parent ad2fbba commit fe5602e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ - (void)didPressLogin:(id)sender {
[self.client getAuthorizationCode:^(NSString *code) {
[self.client getAccessToken:code success:^(NSDictionary *accessTokenData) {
NSString *accessToken = [accessTokenData objectForKey:@"access_token"];
[self.client getPath:[NSString stringWithFormat:@"https://api.linkedin.com/v1/people/~?oauth2_access_token=%@&format=json", accessToken] parameters:nil success:^(AFHTTPRequestOperation *operation, NSDictionary *result) {
[self.client GET:[NSString stringWithFormat:@"https://api.linkedin.com/v1/people/~?oauth2_access_token=%@&format=json", accessToken] parameters:nil success:^(AFHTTPRequestOperation *operation, NSDictionary *result) {
NSLog(@"current user %@", result);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"failed to fetch current user %@", error);
Expand All @@ -66,4 +66,4 @@ - (void)didReceiveMemoryWarning {
// Dispose of any resources that can be recreated.
}

@end
@end

0 comments on commit fe5602e

Please sign in to comment.