Configuration and Compatibility

JavaScript SDK

Initializing the Framework

JavaScript
<script type="text/javascript" src="https://platform.linkedin.com/in.js">
  api_key:    [API_KEY]
  onLoad:     [ONLOAD]
  authorize:  [AUTHORIZE]
  lang:       [LANG_LOCALE]
</script>

Parameters

  • API_KEY (required) Your API key. (Get a key)
  • ONLOAD (optional, comma-separated) The names of JavaScript functions which should be invoked once the framework has finished loading.
  • AUTHORIZE (optional, boolean, default=false) If false, then the framework will not automatically check to see if API access is available for the current user. If true, then the framework will check (based on the user's cookie) and if API access is available, then an oauth token will be retrieved automatically. In other words, if you set authorize: true, then the framework will attempt to auto-login the user.
  • LANG (optional, default=en_US) You can localize a JavaScript plugin in one of the languages that we support. Currently, this functionality has been implemented only for the Sign-in plugin.

API Domains

The Javascript Domain field must be set in order for your key to work with the JS SDK.  This is covered in Getting Started with the LinkedIn JavaScript SDK.

The use of this field follows these guidelines:

  • A single hostname must be used (the field does not support wildcards such as *.mydomain.com)
  • "localhost" is valid, or an IP address, as is any other hostname. Whatever appears in the browser's URL bar when visiting the page is what you need to match.
  • To use JS SDK plugins on an SSL server, enter the URL with https rather than http.
  • For each hostname set, any port on that host will work.
  • Multiple server names can sometimes be desired, for situations where there is a development and production system, or different servers for mobile and desktop, or for applications multiple URL entry points. Multiple server names can be entered in the field as a comma-separated list.
    http://m.mydomain.com, http://www.mydomain.com, https://www.mydomain.com

Supported Browsers

The JavaScript SDK supports the following browsers:

  • Firefox 3
  • Chrome
  • Safari 5
  • IE 6/7/8

IE 6 support may be deprecated in the future.