【发布时间】:2015-03-09 13:52:15
【问题描述】:
在搜索公司时尝试让自动完成功能在我的应用中运行。 就我而言,我正在寻找“ska” 三 (3) 种不同的场景:
1 - 在浏览器中转到https://www.linkedin.com/ta/federator?types=company&query=ska。 结果:您会收到带有数据的 json 响应。
2。尝试通过 javascript 调用它 前端
$("#birds").autocomplete({
minLength: 3,
source: function (request, response) {
// request.term is the term searched for.
// response is the callback function you must call to update the autocomplete's
// suggestion list.
$.ajax({
url: "https://www.linkedin.com/ta/federator?types=company",
data: { query: request.term },
dataType: "json",
success: response,
error: function () {
response([]);
}
});
}
});
结果:空
场景 3:
使用您的 API 和密钥调用 LinkedIn API。 API 调用“company-search?keywords={your-partial-word}” 结果: 搜索结果与自动完成完全不同。自动完成建议要好得多。
关于如何在仅搜索公司时为 LinkedIn 构建自动完成功能的建议。
如前所述,有两种不同的方式。
- 拨打https://www.linkedin.com/ta/federator?types=company&query={name}
- 使用 LinkedIn API - 使用 (1) 时显示的效果不佳,也不是预期的结果
【问题讨论】:
-
这个合法使用吗?
标签: api types autocomplete linkedin