问题描述
有什么方法可以正确地从Instagram oEmbed获取视频的缩略图吗?
Is there any way how to correctly fetch the thumbnail image for video from Instagram oEmbed?
oEmbed响应中的典型 thumbnail_url
现在是 https://scontent-cdg2-1.cdninstagram.com/vp/5c0c62bb1aec72c31a9e72680b9d839b/5C37201B/t51.2885-15/sh0.08/e35/p640x640/47693743_354556005338968_7959923928510913600_n.jpg
会产生"URL签名不匹配"而不是图像.
The typical thumbnail_url
in oEmbed response now is https://scontent-cdg2-1.cdninstagram.com/vp/5c0c62bb1aec72c31a9e72680b9d839b/5C37201B/t51.2885-15/sh0.08/e35/p640x640/47693743_354556005338968_7959923928510913600_n.jpg
that produces "URL signature mismatch" instead of the image.
推荐答案
您需要做的就是使用instagram提供的短链接,您可以找到此链接,也可以通过用户界面中的embed函数或通过API查找,在API中显示为链接",然后在末尾添加"/media",这将重定向到资源,而无需对调用进行签名.
What you need to do, is to use the shortlink provided by instagram, you can find this or either via the embed function in the UI or via the API, In the API shows as 'link', then add '/media' at the end, this will redirect to the resource without need to sign the calls.
希望有帮助
这篇关于Instagram oEmbed-thumbnail_url的URL签名不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!