Hello everyone,
we are developing an application that needs to OEmbed tweets in its backoffice.
What we have been doing so far is using the so called discovering feature, which basically means calling the tweet URL and then looking for the href attribute in the tag <link rel="alternate" type="application/json+oembed" ... /> contained in the html returned from the called URL.
This has been working fine until two days ago (05/22/2018), when one of our customer reported that the feature was broken.
After doing some investigation we noticed that the “tweet html” didn’t contain the link tag related to oembed anymore. We also noticed that this behavior was somewhat related to the “User-Agent” header of the HTTP request: when using a valid browser User-Agent the link tag was part of the html response while when using a custom User-Agent it was not (we are actually using a server-to-server call from our backend to twitter).
As of today, everything seems to work as expected again.
What we’d like to know is:
- is this a known issue?
- is the discovery method officially supported from Twitter?
- is Twitter changing the way link tags are included in the html head of tweets?
Kind regards,
Prisco Fallaci