簡體   English   中英

Linkedin API-獲取完整數據

[英]Linkedin API - get full data

我嘗試制作一個腳本來從LINKEDIN獲取數據,我能夠獲得許多有關個人資料的信息,例如姓名,郵件,電話,圖片url等,不幸的是,我怎么嘗試都無法獲得工作經驗等信息還有很多其他

我的請求如下所示:

   $xml_response = $linkedin->getProfile("~:(id,first-name,last-name,interests,publications,patents,languages,skills,date-of-birth,email-address,phone-numbers,im-accounts,main-address,twitter-accounts,headline,picture-url,public-profile-url)");

這項工作正常,但是請嘗試添加公司

錯誤:

我在$linkedin->getProfile的末尾添加了它,這是我得到的錯誤消息:

[消息] =>資源{人}中的未知字段{companies}

全功能看起來像:

public function linkedinGetUserInfo( $requestToken='', $oauthVerifier='', $accessToken=''){
    include_once 'linkedinoAuth.php';

    $linkedin = new LinkedIn($this->config['linkedin_access'], $this->config['linkedin_secret']);
    $linkedin->request_token    =   unserialize($requestToken); //as data is passed here serialized form
    $linkedin->oauth_verifier   =   $oauthVerifier;
    $linkedin->access_token     =   unserialize($accessToken);

    try{
        $xml_response = $linkedin->getProfile("~:(id,first-name,last-name,interests,publications,patents,languages,skills,date-of-birth,email-address,phone-numbers,im-accounts,main-address,twitter-accounts,headline,picture-url,public-profile-url,educations,companies)");
    }
    catch (Exception $o){
        print_r($o);
    }
    return $xml_response;
}

我找到的文檔(但沒有幫助我)
https://developer.linkedin.com/docs/fields

我希望我能錯過一些真正愚蠢的事情,但無法弄清楚,我能幫助我嗎?

LinkedIn在2015年5月12日之前提供了所有這些字段。

https://api.linkedin.com/v1/people/~:(id,名字,姓氏,電子郵件地址,圖片網址,行業,協會,興趣,數字建議,出生日期,榮譽獎,三個當前職位,三個過去職位,志願者,位置 ,“ +

“職位:(id,標題,摘要,開始日期,結束日期,當前公司:(id,名稱,類型,大小,行業,股票行情)),” +

“教育:(身份證,學校名稱,學習領域,開始日期,結束日期,學位,活動,說明),” +

“出版物:(id,標題,發布者:(name),作者:(id,name),日期,url,摘要),” +

“語言:(id,語言:(名稱),熟練程度:(級別,名稱)),” +

“技能:(id,技能:(名稱)))”;

“課程:(id,name,number),” +

“收到的建議:(id,建議類型,建議文本,建議))”;

“專利:(id,標題,摘要,編號,狀態:(id,名稱),辦公室:(名稱),發明人:(id,名稱),日期,URL))”;

但是,他們已經更新了API鏈接: https : //developer.linkedin.com/support/developer-program-transition

僅根據這些配置文件API-/ v1 / people /〜Share API-/ v1 / people /〜/ shares公司API-/ v1 / companies / {id}

端點將處於活動狀態,Rest需要使用Linkedin的應用程序/具有鏈接關聯的伙伴。

電話號碼,IM帳戶,主要地址,Twitter帳戶,標題將位於r_contactinfo下,需要使用Linkedin進行申請

除了companies ,您必須使用positions關鍵字。

$xml_response = $linkedin->getProfile("~:(id,first-name,last-name,positions)");

將字段描述放在以下地址中。

https://developer.linkedin.com/docs/fields/positions

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM