Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>
like image 730
Siva Sankar Avatar asked Mar 08 '23 19:03

Siva Sankar


1 Answers

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

like image 151
Tal Avissar Avatar answered Mar 11 '23 09:03

Tal Avissar