We are using Instagram's oEmbed-API to get embed codes. However, we do not want to solely rely on that API and generate embed codes ourselves. The embed code as provided by the API (or the website) includes a lot of html, css image data and text content, all of that already has to be there before you can work the embed js on it. This is a problem because we cannot implement a generic embed code but have to know the instagram content for each photo or video in advance.
My question is: Ist there a generic embed code, something like this, for instagram?
<script async defer=\"defer\" src=\"//platform.instagram.com/en_US/embeds.js\"></script>
<script>instgrm.Embeds.genenerate('some instragram ID for instance')<script/>
Embed codes allow your profile or content to be shared along with your username and a link to your Instagram profile. Note that for a post or profile to be embedded, your account must be public and the Embeds setting must be turned on. Private accounts and content from private accounts cannot be embedded.
Login to your iFrame website admin panel and create or edit a page. Paste the embed code where you want the Instagram feed widget to appear. Save and view your page. Done!
Instagram, another popular application, injects JavaScript code as well. While it does not monitor keyboard inputs, it does monitor all JavaScript messages and all text selections, and injects external JavaScript code.
You can use iframe
to embed like this:
<iframe src="https://www.instagram.com/p/BFKjVxkBsCC/embed" width="400" height="480" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
adding /embed
to instagram post URL will give you image that can be embedded
adding /embed/captioned
will add caption to the image
Here is link to easily generate embed code: https://www.picodash.com/instagram/embed#https://www.instagram.com/p/BFKjVxkBsCC/
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