Question

Is it possible to get User's Interest from LinkedIn using LinkedIn API. I can get the user basic details, But i dont know that how to get the Interest list. I also searched in google, but nothing wll helps me. Any help regarding this will be appreciated. Thanks.

Était-ce utile?

La solution

At finally found the answer, It is very simplest one, but it takes these much time to find out,

Just added the interests option in the following url,

NSURL* url = [NSURL URLWithString:@"http://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address,picture-url,public-profile-url,interests)"];

OAMutableURLRequest *request =
[[OAMutableURLRequest alloc] initWithURL:url
                                consumer:consumer
                                   token: self.accessToken
                                callback:nil
                       signatureProvider:nil];

[request setValue:@"json" forHTTPHeaderField:@"x-li-format"];

OADataFetcher *fetcher = [[OADataFetcher alloc] init];
[fetcher fetchDataWithRequest:request
                     delegate:self
            didFinishSelector:@selector(profileApiCallResult:didFinish:)
              didFailSelector:@selector(profileCancel:didFail:)];

Autres conseils

Now using Linkedin sdk developer can easily fetch this kind of data.

NSString *url = @"https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address,picture-url,public-profile-url,interests)" //NSString *url=@"https://api.linkedin.com/v1/people/~?format=json";

if ([LISDKSessionManager hasValidSession]) {
    [[LISDKAPIHelper sharedInstance] getRequest:url success:^(LISDKAPIResponse *response) {
        DLog(@"Success: %@", response.description);
        DLog(@"response.data: %@", response.data);
        DLog(@"statusCode: %d", response.statusCode);

    } error:^(LISDKAPIError *apiError) {
        DLog(@"Error: %@", apiError.description);
    }];
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top