Anyone know whether Facebook supports oEmbed for embedding videos (or other media) when a link is shared. I googled but cant get a definitive answer for this.
My question Facebook developer forum has no answer. http://forum.developers.facebook.net/viewtopic.php?pid=334549
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.
Embedly is paid. Free alternative is Noembed. :)
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>
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With