加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – 在iPhone sdk中从LinkedIn获取用户个人资料数据

发布时间:2020-12-15 01:50:33 所属栏目:百科 来源:网络整理
导读:使用IOS,我试图将LinkedIn集成到应用程序中. 集成也正常,用户登录也有效,但是我无法获取用户配置文件的数据,其中包含用户的所有记录,如教育,技能等. 成功登录后,我只能获得这四个值. ????-名字 ????-site-标准轮廓请求 ????-姓 ????-标题 任何人都可以取得所
使用IOS,我试图将LinkedIn集成到应用程序中.
集成也正常,用户登录也有效,但是我无法获取用户配置文件的数据,其中包含用户的所有记录,如教育,技能等.
成功登录后,我只能获得这四个值.
????-名字
????-site-标准轮廓请求
????-姓
????-标题

任何人都可以取得所有的价值而不是这些.
谢谢你.

解决方法

问题是登录后从LinkedIn获取个人资料数据.
演示应用程序来自 https://github.com/ResultsDirect/LinkedIn-iPhone

我们必须在“ – (RDLinkedInConnectionID *)profileForCurrentUser”这个函数中进行更改.
该功能位于LinkedInClientLibrary – >课程 – > RDLinkedInEngine这个位置.

我们只需要更改以下网址即可获取数据.

NSURL* url = [NSURL URLWithString:[kAPIBaseURL stringByAppendingString:@"/v1/people/~/
"]];

要获取用户个人资料数据,只需将网址更改为:

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))"]];

通过此URL,我们可以获取配置文件用户的数据.

要从用户个人资料中获取更多字段,请参阅以

https://developer.linkedin.com/documents/field-selectors
https://developer.linkedin.com/documents/profile-fields

要根据字段获取数据,我们必须提及该字段的父级和所需的字段.这在https://developer.linkedin.com/documents/profile-fields此链接中列出.

如果我们想要教育数据,那么我们必须提到

educations:(school-name,activities)

教育将是父级,括号()中的其他数据是我们可以从个人资料中获取的字段.

希望这也适合你.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读