Siva Sankar
Siva Sankar

Reputation: 543

How to get the user friends list using LinkedIn?

I tried bellow code but it's not working.

AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
[manager GET:[NSString stringWithFormat:@"https://api.linkedin.com/v1/people/~/connections:(picture-url,first-name,last-name,id,industry,positions:(company:(name),title),specialties,date-of-birth,interests,languages,siteStandardProfileRequest)?oauth2_access_token=%@&format=json",accessToken] parameters:nil  progress:nil success:^(NSURLSessionTask *task, id responseObject) {

 NSLog(@"%@",responseObject);

     } failure:^(NSURLSessionTask *operation, NSError *error) {
        NSLog(@"Fail");

    }];

After hitting this api i get bellow responce. Please help me how to get the linkedin friends list.

   <error>
   <status>403</status>
   <timestamp>1498049304917</timestamp>
   <request-id>G6GU8W51BY</request-id>
   <error-code>0</error-code>
   <message>Access to connections denied</message>
   </error>

Upvotes: 4

Views: 1672

Answers (1)

Tal Avissar
Tal Avissar

Reputation: 10304

Update: LinkedIn has restricted their open API access, and to get the properties of user friends list no longer works.

The Connections API is only for LinkedIn partners now.

On February 12th 2015 Linkedin announced a series of changes in their developer program. These changes have now begun to take effect and will be rolled out to the entire LinkedIn application base between May 12th - May 19th, 2015. You can see more details here

Upvotes: 8

Related Questions