Monday, June 3, 2024
Homepage · c#
 Popular · Latest · Hot · Upcoming
82
rated 0 times [  83] [ 1]  / answers: 1 / hits: 12157  / 11 Years ago, fri, january 24, 2014, 12:00:00

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



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.


More From » c#

 Answers
0

Your API key looks a bit short...



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




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.




Also, make sure you specified your API Domain.



He outlines the full series of steps as follows:




To register an API key:



head over to https://www.linkedin.com/secure/developer



log in and
click the link to Add New Application



fill out the following info:




  • Company (choose from the dropdown)


  • Application Name (e.g. My Company
    Jobs)


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


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



[#48390] Thursday, January 23, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
keric

Total Points: 572
Total Questions: 93
Total Answers: 97

Location: Cyprus
Member since Mon, Oct 24, 2022
2 Years ago
;