简体   繁体   English

Linkedin API公司更新未返回50个最新更新

[英]Linkedin API Company Updates not returning 50 recents updates

I am trying to fetch companies updates with this API https://developer.linkedin.com/docs/company-pages#company_updates 我正在尝试使用此API获取公司更新https://developer.linkedin.com/docs/company-pages#company_updates

I use Node.js with linkedin-js package module wrapper. 我将Node.js与linkedin-js软件包模块包装一起使用。 I found that I only got 5 posts from this company (id=3487133). 我发现我从该公司仅获得5个帖子(id = 3487133)。 But it shown in page, that it got more than 5 updates. 但是它显示在页面上,它有5个以上的更新。 How can I get all its posts updates ? 我如何获取其所有帖子更新? Thanks. 谢谢。

Here is my code 这是我的代码

var linkedin_client = require('linkedin-js')(appid, appsecret, url_callback)


var cid = 3487133;
var param = {
  token: {
    oauth_token_secret: <token_secret>,
    oauth_token: <token>
  },
  count: 50
}

//post
linkedin_client.apiCall('GET', '/companies/' + cid + '/updates', param, function(error, result) {
  console.log(result)
});

There is nothing wrong with your code. 您的代码没有错。

From https://developer.linkedin.com/docs/company-pages#company_updates you can find that https://developer.linkedin.com/docs/company-pages#company_updates中,您可以找到

Only the most recent 50 updates for events of type status-update will be returned. 仅返回状态更新类型事件的最近50个更新。 For all other event types, the request will return all the updates within the past 20 days, or 250 total updates - whichever comes first. 对于所有其他事件类型,请求将返回过去20天内的所有更新,或返回250个总更新-以先到者为准。

Using Linkedin console ( https://api.linkedin.com/v1/companies/3487133/updates ) fo getting the updates for your company, its giving the same 5 posts. 使用Linkedin控制台( https://api.linkedin.com/v1/companies/3487133/updates )获取您公司的更新,并给出5条相同的帖子。 Rest of the posts in your page are 20 days + older. 您页面中的其余帖子都超过20天。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM