您必须指定一个有效的JavaScript API域作为此密钥配置的一部分.在领英 [英] You must specify a valid JavaScript API Domain as part of this key's configuration. in LinkedIn

查看:59
本文介绍了您必须指定一个有效的JavaScript API域作为此密钥配置的一部分.在领英的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试创建具有LinkedIn选项和回调选项的MVC4应用程序.

I try to create a MVC4 application with LinkedIn share option with callback option.

我用我的应用程序ID在Layout.cshtml中引用我的脚本.

i refer my script in my Layout.cshtml with my app id.

  <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>

但是萤火虫显示如下图所示的消息

But the firebug shows a message like below image

但是我确定我的AppID是正确的.我不知道出现此错误的原因是什么.

But i am sure my AppID is correct. I don't know what is the reason to appear this error.

编辑

我将api_key放在单引号内

I place the api_key inside the single quote

 <script type="text/javascript" src="//platform.linkedin.com/in.js">
        api_key: 'APIkeyGOEShere'
    </script>

但是萤火虫却变了

错误:API密钥无效引发新错误("API密钥无效");

任何格式都需要在javascript内放置API密钥.

Any format need to place API key inside of the javascript.

请帮助.

推荐答案

您的API密钥看起来有点短...

Your API key looks a bit short...

您刚刚注册了API密钥吗?根据Eugene O'Neill在此论坛:

Did you just register your API key? According to Eugene O'Neill on this forum:

注册API密钥并指定有效域后,它可能更改最多需要30分钟才能生效,因此如果更改没有生效立即工作,去喝杯咖啡,然后再检查几杯.

After registering an API key and specifying a valid domain, it may take up to 30 minutes for the changes to take affect, so if it doesn't work immediately, go grab a coffee and check back in a few.

此外,请确保您指定了API域.

Also, make sure you specified your API Domain.

他概述了以下全部步骤:

He outlines the full series of steps as follows:

要注册API密钥:

To register an API key:

前往 https://www.linkedin.com/secure/developer

登录并点击链接以添加新应用

log in and click the link to Add New Application

填写以下信息:

  • 公司(从下拉列表中选择)

  • Company (choose from the dropdown)

应用名称(例如我的公司)职位)

Application Name (e.g. My Company Jobs)

说明(例如,用于接收来自工作的申请申请人)

Description (e.g. For receiving applications from job applicants)

JavaScript API域(这是重要的一步.这是网站上的按钮将继续显示,例如 http://www.mycompany.com )

JavaScript API Domain (this is an important step. this is the website the button will go on e.g. http://www.mycompany.com)

应用程序使用(如果没有与您的应用程序匹配的内容,请从列表中选择一个需要,请选择其他")

Application Use (select one from the list, if nothing matches your needs, choose "other")

开发人员联系电子邮件(您的电子邮件地址)

Developer Contact Email (your email address)

电话(如果出现问题,可以通过该电话号码与您联系帐户)

Phone (a phone number you can be reached at if there are issues with the account)

选中我同意"安全文本(输入您输入的字符见正上方)

check "I agree" Security text (enter the characters you see just above it)

这篇关于您必须指定一个有效的JavaScript API域作为此密钥配置的一部分.在领英的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆