I copied the code from this link by giving company name and clicking the Get Code button. It generated the code given below
<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/FollowCompany" data-id="361557" data-counter="right"></script>
I pasted this code in tag of a html file and then run the html file in Chrome, Firefox and IE, but all browser gave a blank page as output.
Then I paste those script n the tag but the output remains same.
How should I create the html file, so that it could generate the inFollow button.
Please help me.
Well it appears that you are just invoking the JavaScript. You must place the JavaScript into an HTML Document and then have an element that corresponds with that script.
Remember you also have to have a full structured HTML Document before you can just place Script tags into it, you need html, body, head, tags, etc.
Try creating an HTML Document and placing this within the .html file.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/FollowCompany" data-id="361557" data-counter="right"></script>
</body>
</html>
Tips to remember:
Hope this helps!
EDIT: Just upload it to a server, once you do that, it will work. I cannot explain why though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With