Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
271 views
in Technique[技术] by (71.8m points)

c# - You must specify a valid JavaScript API Domain as part of this key's configuration. in LinkedIn

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

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

enter image description here

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

Edits

I place the api_key inside the single quote

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

But i get a different in firebug

Error: API Key is invalid throw new Error("API Key is invalid");

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

Please help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Remove the quotes around apikey. That is the problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...