linkedin Uncaught Error: You must specify a valid JavaScript API Domain as part of this key's configuration

前端 未结 4 1292
你的背包
你的背包 2020-12-16 10:14

I have followed the instructions listed here in the 10 minute instructions: guide And the help from stackoverflow listed here: stackanswer

I still get this error:

相关标签:
4条回答
  • 2020-12-16 10:27

    Had the same error message thrown by Linkedn. Though my solution appeared to be different.

    I didn't specify my app's domain in settings. After I added it, all started working well. Pay attention to trailing slash. It may also cause errors

    Link to your apps https://www.linkedin.com/developer/apps/.

    0 讨论(0)
  • 2020-12-16 10:36

    Adding to @Rejeesh 's and morunas's correct answers you may need to check your application java script settings and add your domain their as mentioned in Linkedin documentation

    https://developer.linkedin.com/docs/getting-started-js-sdk#initialize

    0 讨论(0)
  • 2020-12-16 10:38

    Adding to @Rejeesh 's correct answer above, if you happen to echo the api_key from a configuration file and have other parameters such as "authorize: true" remember to add an end of line. For example, with PHP:

    <script type="text/javascript" src="//platform.linkedin.com/in.js">
        api_key: <?php echo LINKEDIN_API_KEY . PHP_EOL; ?>
        authorize: true
    </script>
    

    If you don't do this you risk getting it all in the same line and you would also get the same error (your key would be invalid).

    0 讨论(0)
  • 2020-12-16 10:44

    You can try this code

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

    No quotes with api key will work. Add this section in the <head> element.

    0 讨论(0)
提交回复
热议问题