【问题标题】:Get LinkedIn basic profile from someone through the LinkedIn URL通过 LinkedIn URL 从某人那里获取 LinkedIn 基本资料
【发布时间】:2015-04-20 18:52:35
【问题描述】:

我想知道是否可以从某人那里获取 LinkedIn 基本资料?

示例

当我在系统上注册一个新用户时,希望能够获得这个新用户的基本信息,例如记录那个人 LinkedIn 的 URL。

如果可能的话,我该如何使用 Javascript SDK 来做到这一点?

代码

// Setup an event listener to make an API call once auth is complete
function onLinkedInLoad() {
    IN.Event.on(IN, "auth", getProfileData);
}

// Handle the successful return from the API call
function onSuccess(data) {
    console.log(data);
}

// Handle an error response from the API call
function onError(error) {
    console.log(error);
}

// Use the API call wrapper to request the member's basic profile data
function getProfileData() {
    IN.API.Raw("/people/~").result(onSuccess).error(onError);
}

【问题讨论】:

  • JavaScript 没有 SDK。我认为您的意思是API。 SDK 是一种软件开发工具包,可为软件包提供工具。 JavaScript 是一种依赖于浏览器的语言。另一方面,API 是一种抽象编程接口,可让您与另一个应用程序对话。
  • 大多数 API 将要求您注册一个密钥,以便他们可以在出现问题时跟踪您的使用情况,并且他们需要知道谁做了什么(审计目的)。您可能可以通过 JSONP 请求侥幸逃脱,但我还没有研究过他们的 API。您可能想查看他们的"Getting started with the REST API" page。这可能更直接。

标签: javascript linkedin


【解决方案1】:

我认为 LinkedIn 文档很好地涵盖了这一点。如果您正在寻找更具体的内容,您应该澄清一下。

你应该看看https://developer.linkedin.com/docs/js-sdk

您链接的来源看起来来自https://developer.linkedin.com/docs/signin-with-linkedin,但如果不是,您也应该查看它。

【讨论】:

    猜你喜欢
    • 2020-07-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-20
    • 2019-10-21
    • 2021-04-11
    • 2017-09-01
    相关资源
    最近更新 更多