Note that there are some explanatory texts on larger screens.

plurals
  1. POHow does LinkedIn know or keep track of where I embedded its widget?
    primarykey
    data
    text
    <p>When you try to integrate with LinkedIn's <code>Apply Now</code> button, you first sign up for an API key. The form asks you to enter the Javascript Domain API, which is the <code>Fully-qualified domain name of all pages that will call the JavaScript API with this key.</code> In return, it produces an API key and some HTML code for you which you can copy n paste to your web page and get started.</p> <p>This is the code their wizard produced:</p> <pre><code>&lt;script src="http://platform.linkedin.com/in.js" type="text/javascript"&gt; api_key: 7a4ghb12agvda4552da &lt;/script&gt; &lt;script type="IN/Apply" data-companyname="Asd" data-jobtitle="Software Developer" data-joblocation="Istanbul" data-email="abc@xyz.com"&gt; &lt;/script&gt; </code></pre> <p>Now, how does one keep track of where this script is embedded? I first entered <code>http://example.com</code> as the my Javascript Domain API. It turned out that I can only use this widget on the example.com domain.</p> <p>What's inside <code>in.js</code> that tells LinkedIn where it is embedded?</p> <p>The reason I'm asking is because I am also building a widget myself, and I want to make sure only the signed-up domains can use my widget.</p> <p><strong>Edit:</strong> As a bonus, what if I download <code>in.js</code>, remove the part where it does the domain check and include my own version of in.js in my page? How do they prevent that?</p> <p><a href="https://developer.linkedin.com/forum/security-prevent-impersonations" rel="nofollow">A LinkedIn employee mentions that both client-side and server-side checks are done.</a> But what kind of a check would that be? I am looking for some deep insight into the issue. How can I produce such a widget? On the client-side, how do you check the current page that hosts your .js file? And how do you get which domain is hosting the js file? Any help appreciated. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload