Unrelated, but FYI, we’re still having to rebuild all our posts containing Instagram content every few days as Instagram seem to still be expiring ‘something’. Re Instagram oneboxing - #58 by Richie
I’m guessing this oEmbed change won’t solve this 18 month old issue too will it?
Okay, so I updated our custom Instagram onebox engine to use official oEmbed endpoint instead of scraping Instagram page for OpenGraph tags, and it works quite well:
However, Instagram’s oEmbed data does not indicate what type of media it is, so we regress in two areas:
we can’t indicate if a link is a video
we can’t indicate if a link is an album
But the advantage of using official oEmbed endpoint is that it will not break randomly and will be stable longer term.
Yeah, Instagram provides expiring image links (with timestamps) that are supposed to work for a limited time. To mitigate this I am now using these type of link for image url: https://www.instagram.com/p/CAlLWw-lU3S/media/?size=l
The above link redirects to actual image and does not expire so it should theoretically fix the image expiring issue.