linkedin javascript api 开发人员中的 api_key 是什么

what is an api_key in linkedin javascript api developer

当我尝试编写用于使用 linkedin 登录的代码时,出现如下错误。

未捕获错误:您必须指定一个有效的 JavaScript API 域作为此密钥配置的一部分。

下面是我的JavaScript代码

<script type="text/javascript" src="//platform.linkedin.com/in.js">
    api_key: ######//keep it secret
    authorize: true
    onLoad: onLinkedInLoad
</script>

<script type="text/javascript">

    // 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) {
        // Pre-populate your form fields here once you know the call 
        // came back successfully
    }

    // 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/~:(firstName,lastName,emailAddress)").result(onSuccess).error(onError);
    }

</script>

我相信您正在寻找 https://developer.linkedin.com/support/faq。我说的对吗?

Click on the My Apps link in the top navigation menu to manage your LinkedIn applications. From here, you can create a new application if you don't already have one, or view the details of your existing applications. You will find your Client ID (otherwise known as API Key/ID or Consumer Key/ID) listed in the "Authentication" side nav link, underneath the header "Authentication Keys".