是否可以使用LinkedIn API从LinkedIn获得用户的兴趣。我可以获得用户基本的详细信息,但我不知道如何获得兴趣列表。我也在谷歌搜索,但没有什么能帮助我。任何有关这方面的帮助将不胜感激。 感谢。
答案 0 :(得分:1)
终于找到了答案,这是最简单的答案,但需要花费这么多时间才能找到答案,
刚刚在以下网址中添加了interests
选项,
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:)];
答案 1 :(得分:0)
现在使用Linkedin sdk开发人员可以轻松获取此类数据。
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);
}];
}