我尝试使用带有回调选项的LinkedIn共享选项创建一个MVC4应用程序.
我用我的app id在我的Layout.cshtml中引用我的脚本.
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: APIkeyGOEShere
</script>
<script type="text/javascript">
function testme(count) {
alert("That document has been shared: " + count + " times");
}
</script>
Run Code Online (Sandbox Code Playgroud)
但是萤火虫显示的信息如下图所示

但我相信我的AppID是正确的.我不知道出现此错误的原因是什么.
编辑
我将api_key放在单引号内
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: 'APIkeyGOEShere'
</script>
Run Code Online (Sandbox Code Playgroud)
但我在萤火虫中得到了一个不同的东西
错误:API密钥无效抛出新错误("API密钥无效");
任何格式都需要将API密钥放在javascript中.
请帮忙.