I couldnβt find a way to get the embed URL, however, by studying Instagram instilled by it, I was able to determine how to create it based on the information provided by the Media API endpoint. Basically, you just need to add /embed/ at the end of the short URL for part of the medium. Therefore, in a Django template, it will look something like this:
<iframe src="{{ media.short_link }}embed/" width="612" height="710" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
As an interesting note, I also found that you can change the width and height of the embed code, and it works without any problems (at least when you only reduce the size by half, I havenβt tried anything else).
Josh ourisman
source share