I am putting link previews in my web app. I'm using nodejs in backend to retrieve og properties (like site_name, description, image, title, etc). Links of YouTube and other stuffs works fine but with Instagram's link, the Open Graph meta tags are missing inconsistently in the response body of the link.
For Example, consider this link: https://www.instagram.com/p/B_hs0pUlRvR/
when I request body of this link in my script running in my local machine, it does consists of the og meta tags.
But when I put the same script in cloud, and perform the same request those meta tags goes missing.
I tried to view the source code of the link in my mobile phone, such kind of strange behavior continues there as well.
no og tags when source code is viewed in normal mode
og: meta tags are present when source code is viewed in Incognito mode
I have tried to change user-agent in the request but that didn't helped. What's the reason behind this and how can I get link preview of Instagram post's links succesfully.