在iPhone sdk中从LinkedIn获取用户个人资料数据 [英] Fetching user profile data from LinkedIn in iPhone sdk
问题描述
使用IOS,我正在尝试将LinkedIn集成到应用程序中。
集成也正常,用户登录也有效但我无法获取用户配置文件的数据,其中所有用户记录为Education,Skills等。
成功登录后,我只能获得这四个值。
-first-name
-site-standard-profile-request
-last-name
-headline
Using IOS, I am trying to integrate the LinkedIn into the application. The integration is also working,user login is also working but the I am not able to fetch the data of user profile with all records of user as Education,Skills and all. I am able to get only these four values after successful login. -first-name -site-standard-profile-request -last-name -headline
Can任何人都应该得到所有的价值而不是这些。
非常感谢。
Can anyone please to get all the values rather than these. Thanks in adavance.
推荐答案
问题是登录后从LinkedIn获取个人资料数据。
演示应用程序来自 https://github.com/ResultsDirect/LinkedIn-iPhone
The question was to get the profile data from LinkedIn after login. The demo application is from https://github.com/ResultsDirect/LinkedIn-iPhone
我们必须对 - (RDLinkedInConnectionID *)profileForCurrentUser这个函数进行更改。
该函数位于LinkedInClientLibrary - > Classes - > RDLinkedInEngine这个位置。
We have to do changes in "-(RDLinkedInConnectionID *)profileForCurrentUser " this function. The function is located at LinkedInClientLibrary -> Classes -> RDLinkedInEngine this location.
我们只需更改以下网址即可获取数据。
We just have to change the below url to get data.
NSURL* url = [NSURL URLWithString:[kAPIBaseURL stringByAppendingString:@"/v1/people/~/
"]];
要获取用户个人资料数据,只需将网址更改为:
To get the user profile data just change the url to:
NSURL* url = [NSURL URLWithString:[kAPIBaseURL stringByAppendingString:@"/v1/people/~:(id,first-name,last-name,maiden-name,formatted-name,phonetic-last-name,location:(country:(code)),industry,distance,current-status,current-share,network,skills,phone-numbers,date-of-birth,main-address,positions:(title),educations:(school-name,field-of-study,start-date,end-date,degree,activities))"]];
通过此网址,我们可以获取个人资料用户的数据。
From this url we can get the data of the profile user.
要从用户个人资料中获取更多字段,请参阅以下链接:
To get more fields from user profile refers these links:
https://developer.linkedin.com/documents/field-selectors
https://developer.linkedin.com/documents/profile-fields
根据字段获取数据我们必须提及该字段的父级和所需的字段。这在 https://中列出developer.linkedin.com/documents/profile-fields 此链接。
To get data according to fields we have to mention the parent of that fields and needed fields from that.This is listed in https://developer.linkedin.com/documents/profile-fields this link.
如果我们需要教育数据,那么我们必须提及
If we want data from education so we have to mention as
educations:(school-name,field-of-study,start-date,end-date,degree,activities)
教育会是括号()中的父和其他数据是我们可以从个人资料中获取的字段。
educations will be the parent and other data in brackets() are its fields which we can get from profile.
希望这也适用于你。
这篇关于在iPhone sdk中从LinkedIn获取用户个人资料数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!