How to get user friend list using LinkedIn?

I tried the code but it does not work.

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 will get a roar. Please help me how to get the list of friends on the 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>
+4
source share
1 answer

Refresh . LinkedIn has restricted access to the public API, and the user no longer works to get the properties of the friends list.

The connection API is now available only to LinkedIn partners.

12 2015 Linkedin . LinkedIn 12 19 2015 .

+5

Source: https://habr.com/ru/post/1679814/


All Articles