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>
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With