LinkedIn company follow button opens blank page
Asked Answered
B

1

12

Is it normal that LinkedIn's company follow button opens a blank page? The button comes from a javascript snippet provided by LinkedIn.

I disabled the ad-blocker I use to make sure that isn't the problem.

In the inspector I can see that pressing it submits a GET request that responds with a 200 OK with empty response:

{"content":{},"status":"ok"}

It then opens a blank page. And nothing else happens.

It happened in production with the code given by the client to me, so I thought they might have missed something. So I went to the linkedin developer site:

https://developer.linkedin.com/plugins/follow-company

I entered the company name and language, and it renders the button as a preview and also displays the js code to copy/paste wherever you need.

No matter what company or language I choose, the result is always the same. Blank page opens. I've tested it locally and in servers. Same result.

EDIT:

Here's the Javascript I used:

<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: nl_NL</script>
<script type="IN/FollowCompany" data-id="1441" data-counter="top"></script>
Bield answered 23/1, 2018 at 9:2 Comment(2)
Please add to this question the javascript you are using.Deutsch
@BenSmith thanks, doneBield
G
0

Its working fine.

If you run it locally it will give error. If you are running it no server please check its not running in sandbox if its running in sandbox use <iframe sandbox="allow-same-origin allow-scripts allow-popups allow-forms" Find more information about sandbox Play safely in sandboxed IFrames

Try It on W3 w3 Try IT

Remove all code and copy paste it.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>Check This</title>
</head>
<body>

    <script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: nl_NL</script>
    <script type="IN/FollowCompany" data-id="1441" data-counter="top"></script>


</body>
</html>
Garnett answered 31/1, 2018 at 8:19 Comment(2)
It´s not running in any sandbox, and I´m not using iframes at all. Just the 2 scripts. And I'm running it both locally and in production servers: solerpalau.nl Also trying it in W3 has the same result. Blank page opening.Bield
i have checked your production site button it made me to follow your company, after a while when i tried in google chrome it didn't worked, but has worked perfectly in Firefox. I too don't know why it not happened in chrome. will tell you if i found some solution.Garnett

© 2022 - 2024 — McMap. All rights reserved.