Javascript LinkedIn API 对特定用户只读

Javascript LinkedIn API read-only on a specific user

我正在尝试通过 javascript API 从我的 LinkedIn 个人资料中获取只读 public 信息。我目前有这段代码,但我知道它不完整:

<script>
    function linkedinAuthorized() {
        console.log("Linked in authorized");
    }

    function linkedinLoaded() {
        console.log("Linked in loaded");

        IN.Event.on(IN, "auth", linkedinAuthorized);

        var url = "/people/~?format=json";

        IN.API.Raw()
            .url(url)
            .method("GET")
            .result(function (result) {
                console.log(result);
            })
            .error(function (error) {
                console.log(error);
            });
    }
</script>
<script type="text/javascript" src="//platform.linkedin.com/in.js">
    api_key:   [my key]
    onLoad:    linkedinLoaded
</script>

我能够成功加载链接,但是在执行 IN.API.Raw 调用时我得到:


我怀疑是因为我没有使用其中一个 LinkedIn 登录按钮登录帐户。

我的问题是我是否可以在不通过这些手动授权过程的情况下从特定用户获取只读配置文件信息?

这可能与 this answer 相关联吗?

My question is if can I get read-only profile information from a specific user without going through one of those manual authorization processes?

答案是LinkedIn use OAuth 2.0, even the tool they provide 无法执行请求 https://api.linkedin.com/v1/people/~?format=json

您需要让用户登录才能执行此类操作!