Hello.
As I understand, the instagram shortcode doesn’t work the way it is depicted
in the documentation, thus other post refer to this issue
I found that this solution works for me:
{{- $pc := .Page.Site.Config.Privacy.Instagram -}}
{{- if not $pc.Disable -}}
{{- if $pc.Simple -}}
{{ template "_internal/shortcodes/instagram_simple.html" . }}
{{- else -}}
{{ $id := .Get 0 }}
{{ $hideCaption := cond (eq (.Get 1) "hidecaption") "1" "0" }}
{{ with getJSON "https://graph.facebook.com/v8.0/instagram_oembed/?url=https://instagram.com/p/" $id "/&hidecaption=" $hideCaption "&access_token=<APPID>|<CLIENTTOKEN>" }}{{ .html | safeHTML }}{{ end }}
{{- end -}}
{{- end -}}
So when i use this in my .md file:
{{< instagram CLH064aBUe7 hidecaption >}}
The image shows all fine
I want to use the instagram_simple
shortcode:
{{< instagram_simple CLH064aBUe7 hidecaption >}}
but that gives me this error:
Failed to retrieve remote file: Bad Request
I undestand that piece of shortcode should enable the instagram_simple but I dont quite understand what im doing wrong here.