Facebook 支持 oEmbed 吗?
任何人都知道 Facebook 是否支持 oEmbed 在共享链接时嵌入视频(或其他媒体)。我用谷歌搜索但无法得到明确的答案。
我的问题 Facebook 开发者论坛没有答案。 http://forum.developers.facebook.net/viewtopic.php?pid=334549
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
是 Facebook 支持 oembed。您可以在此处查看文档。
https://developers.facebook.com/docs/plugins /oembed-endpoints
注意:为了使此 API 在移动设备上的 ajax 调用中正常工作;您需要使用端点域“apps.facebook.com”而不是“www.facebook.com”:
https://apps.facebook.com/plugins/post/oembed.json/?url={content-url}
这是因为如果您使用官方文档“www.facebook.com”移动设备的用户代理将强制重定向到未实现此端点的“m.facebook.com”。
Yes Facebook supports oembed. You can checkout the documentation here..
https://developers.facebook.com/docs/plugins/oembed-endpoints
Note: In order to make this API work properly with ajax calls on mobile devices; You need to use the endpoint domain "apps.facebook.com" instead of "www.facebook.com":
https://apps.facebook.com/plugins/post/oembed.json/?url={content-url}
This is because if you use the endpoint that is provided in the official documentation "www.facebook.com" the User agent of the mobile devices will force the redirect to "m.facebook.com" which does not have this endpoint implemented.
嵌入是付费的。免费替代方案是 Noembed。 :)
Embedly is paid. Free alternative is Noembed. :)
不,当前不支持 oEmbed。您有两个选择(也许更多,但据我所知有两个):
http://www.facebook.com/photo。 php?v=VIDEOID&set=t.SOMENUMBER&type=2
变为
No, there is no current support for oEmbed. You have two options (maybe more, but two that I know of):
http://www.facebook.com/photo.php?v=VIDEOID&set=t.SOMENUMBER&type=2
becomes
<object width="400" height="300" ><param name="allowfullscreen" value="true" /><param name="movie" value="http://www.facebook.com/v/VIDEOID" /><embed src="http://www.facebook.com/v/VIDEOID" type="application/x-shockwave-flash" allowfullscreen="true" width="400" height="300"></embed></object>
2020 年底,支持发生了巨大变化,以防止匿名访问,而是需要开发者帐户和访问令牌。 https://developers.facebook.com/docs/plugins/oembed
The support is drastically changing in late 2020, to prevent anonymous access, and instead require a developer account and access token. https://developers.facebook.com/docs/plugins/oembed
是的,确实如此,但实施时很少出现问题。我建议您尝试我编写的解决方案来克服这个问题: https://shobhitsharma.github.io/embedo< /a>
Yes it does, but has few hiccups when implementing. I'd recommend you to try solution I wrote to overcome this: https://shobhitsharma.github.io/embedo