如何使用LinkedIn javascript sdk检索包括所有字段的位置列表? [英] How to retrieve the list of positions including all the fields using the LinkedIn javascript sdk?

查看:101
本文介绍了如何使用LinkedIn javascript sdk检索包括所有字段的位置列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取LinkedIn会员在其个人资料中输入的每个职位的ID,头衔,摘要,开始日期,结束日期,当前和公司名称。

I want to get the id, title, summary, start-date, end-date, is-current and company name for each position that a LinkedIn member has entered on its profile.

我在 REST控制台上测试了一个查询,我得到了理想的结果。查询是 https://api.linkedin.com/v1/people/~/positions :( id,title,summary,start-date,end-date,is-current,company)?format = json

I tested a query on the REST Console and I got the desired result. The query is "https://api.linkedin.com/v1/people/~/positions:(id,title,summary,start-date,end-date,is-current,company)?format=json".

问题在于,当我尝试使用LinkedIn javascript SDK做同样的事情时,我没有得到整个字段列表对于每个职位。我得到了完整的职位列表,但不是每个职位的所有字段。

The problem is that when I try to do the same thing using the LinkedIn javascript SDK I'm not getting the whole list of fields for each position. I'm getting the complete list of positions, but not all the fields for each position.

这是我正在使用javascript SDK进行的调用:

This is the call that I'm doing with the javascript SDK:

//in this function I'm specifying the list of fields that I want to retrieve for each position
//but I'm getting only some fields (id, start-date and end-date)
function getProfileData() {
        IN.API.Raw("/people/~/positions:(id,title,summary,start-date,end-date,is-current,company)?format=json").result(onSuccess).error(onError);
}

有人知道我需要做些什么来获得相同的结果使用REST控制台?

Somebody has any idea of what I need to do to get the same result than using the REST Console?

推荐答案

如果你想检索你的个人资料数据,请使用这个,

If you want to retrieve your profile data use this,

   IN.API.Profile("me")
        .fields([
                "firstName","lastName","headline","positions:(company,title,summary,startDate,endDate,isCurrent)","industry",
                "location:(name,country:(code))","pictureUrl","publicProfileUrl","emailAddress",
                "educations","dateOfBirth"])
        .result(onSuccess)
        .error(onError);

(或)如果您想要检索其他个人资料数据,请替换 me with< public profile url>

(or) If you want to retrieve other profile data then replace "me" with "<public profile url>"

   IN.API.Profile("url=https://nl.linkedin.com/in/williamhgates")
        .fields([
                "firstName","lastName","headline","positions:(company,title,summary,startDate,endDate,isCurrent)","industry",
                "location:(name,country:(code))","pictureUrl","publicProfileUrl","emailAddress",
                "educations","dateOfBirth"])
        .result(onSuccess)
        .error(onError);

这篇关于如何使用LinkedIn javascript sdk检索包括所有字段的位置列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆