[英]Fetching user profile data from LinkedIn in iPhone sdk
使用IOS,我試圖將LinkedIn集成到應用程序中。 集成也正常,用戶登錄也有效,但是我無法獲取用戶配置文件的數據,其中所有用戶記錄為Education,Skills等。 成功登錄后,我只能獲得這四個值。 -first-name -site-standard-profile-request -last-name -headline
任何人都可以取得所有的價值而不是這些。 謝謝,謝謝。
問題是登錄后從LinkedIn獲取個人資料數據。 演示應用程序來自https://github.com/ResultsDirect/LinkedIn-iPhone
我們必須在“ - (RDLinkedInConnectionID *)profileForCurrentUser”這個函數中進行更改。 該函數位於LinkedInClientLibrary - > Classes - > 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,field-of-study,start-date,end-date,degree,activities)
教育將是父母,括號()中的其他數據是我們可以從個人資料中獲得的字段。
希望這也適合你。
Micro給出的上述解釋是正確的
要從LinkedIn獲取電子郵件ID,只需更改網址
NSURL *url = [NSURL URLWithString:@"http://api.linkedin.com/v1/people/~:(id,first-name,last-name,maiden-name,email-address,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))"];
你會收到電子郵件
或者您想要更多幫助,您可以按照堆棧溢出鏈接無法獲取鏈接連接EMAIL ID
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.