mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-08-28 11:35:44 -04:00
new Twitter oEmbed endpoint (shortcode input changes from tweet ID to full URL)
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-oembed some hacking is required to continue passing only the tweet ID to <amp-twitter data-tweetid="..."> at the same time. ugh. https://amp.dev/documentation/components/amp-twitter/#attributes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%v&dnt=1&omit_script=1&align=center" (index .Params 0) -}}
|
||||
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&align=center&url=%s" (index .Params 0 | safeURL) -}}
|
||||
{{- $json := getJSON $url -}}
|
||||
|
||||
<div class="embed tweet">
|
||||
|
||||
Reference in New Issue
Block a user