Update Twitter shortcode oEmbed endpoint
authorJoe Mooring <joe.mooring@veriphor.com>
Sun, 31 Oct 2021 10:56:36 +0000 (03:56 -0700)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 1 Nov 2021 14:51:00 +0000 (15:51 +0100)
commit0cc39af68232f1a4981aae2e72cf65da762b5768
treeda1c6a143d93544f5d9df2646128f2ae79ca7c3f
parented6fd26ce884c49b02497728a99e90b92dd65f1f
Update Twitter shortcode oEmbed endpoint

The existing endpoint will be retired and removed on November 23, 2021.
References:

- https://twittercommunity.com/t/consolidating-the-oembed-functionality/154690
- https://developer.twitter.com/en/docs/twitter-for-websites/oembed-api#Embedded

This is a backward compatible change.

The existing endpoint requires a single parameter: the id of the tweet.

The new endpoint requires two parameters: the id of the tweet, and the
user with whom it is associated. For the moment, if you supply the wrong
user, the request will be redirected (with a small delay) to the correct
user/id pair. This behavior is undocumented, but we will take advantage
of it as Hugo site authors transition to the new syntax.

{{< tweet 1453110110599868418 >}} --> works, throws warning, deprecate at some point

{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} --> new syntax

Fixes #8130
docs/content/en/content-management/related.md
docs/content/en/content-management/shortcodes.md
docs/content/en/showcase/letsencrypt/index.md
docs/content/en/troubleshooting/faq.md
hugolib/embedded_shortcodes_test.go
tpl/tplimpl/embedded/templates.autogen.go
tpl/tplimpl/embedded/templates/shortcodes/twitter.html
tpl/tplimpl/embedded/templates/shortcodes/twitter_simple.html