【问题标题】:LinkedIn: "You must specify a valid JavaScript API Domain as part of this key's configuration.", AGAINLinkedIn:“您必须指定一个有效的 JavaScript API 域作为此密钥配置的一部分。”,再次
【发布时间】:2014-07-02 22:41:24
【问题描述】:

我刚刚在 LinkedIn Developer Network 和 Other> JavaScript API Domains 文本框中设置了一个新应用程序,我只有输入 http://localhost 当我转到引用 LinkedIn JavaScript (http://localhost/linkedin/#/login) 的页面时,我仍然收到此错误。 该页面的LinkedIn相关sn-p是

<script type="text/javascript" src="http://platform.linkedin.com/in.js">
    //here goes the api key, and the callback function
    api_key: My_API_Key
    onLoad: onLinkedInLoad
    authorize: true
</script>

可能出了什么问题?

【问题讨论】:

    标签: linkedin linkedin-jsapi


    【解决方案1】:

    我发现 localhost 也有同样的问题。但是,当我在 IIS 中创建站点时,在 IIS 中给它一个有效的域名并在“其他 > JavaScript API 域”中使用相同的域,问题就解决了。

    我在 IIS 中的域有端口 80,名称是 local.lc.com。要使其在端口 80 上工作,您需要在 Drivers>etc>hosts

    中注册域

    【讨论】:

      【解决方案2】:

      请尝试将 api_key 替换为您在应用中链接的客户端 ID。

      【讨论】:

      • 您能否扩展您的答案,为什么这会解决问题?
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-01
      • 1970-01-01
      • 2016-06-19
      • 1970-01-01
      相关资源
      最近更新 更多