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

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

问题描述

我尝试创建带有回调选项LinkedIn共享选项MVC4应用程序。

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

我是指我的脚本在我Layout.cshtml与我的应用程序ID。

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>

但我得到在Firebug不同的

But i get a different in firebug

错误:API密钥无效抛出新的错误(API密钥无效);

任何格式需要将API密钥的JavaScript内。

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

请帮忙。

推荐答案

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

Your API key looks a bit short...

你刚才注册的API密钥?根据尤金·奥尼尔在这个论坛

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域此键的配置的一部分。在LinkedIn的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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