Techiio-author
Started by Natasha JonesSep 21, 2021

Open
cannot render script in nextjs

3 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 3 VIEWES SHARE

am trying to integrate LinkedIn follow button in my website made in nextjs. These two scripts return a follow button with follower count on it and I want to add it into my header.

<script src="https://platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script> <script type="IN/FollowCompany" data-id="76160368" data-counter="bottom"></script>

The issue is that when every I refresh my page this works but when I click on any button on my page it just disappears.

2 Replies

Techiio-commentatorPeter Daniels replied 17 days ago0 likes0 dislikes

Use the script tag like this :

import Script from 'next/script';
<script src="https://platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script> <script type="IN/FollowCompany" data-id="76160368" data-counter="bottom"></script>

I hope this will solve your problem..............HAPPY_CODING..........

Techiio-commentatorNatasha Jones replied 17 days ago0 likes0 dislikes

thanks now it is running .

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance