[英]iOS - Get Interests from LinkedIn using LinkedIn API
是否可以使用LinkedIn API從LinkedIn獲得用戶的興趣 。 我可以獲取用戶的基本詳細信息,但是我不知道如何獲取興趣列表。 我也在google中搜索過,但沒有任何幫助。 任何幫助,將不勝感激。 謝謝。
終於找到答案了,這是最簡單的答案,但是要花很多時間才能找出答案,
剛剛在以下網址中添加了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:)];
現在,使用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);
}];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.