11

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

Aravindan R
  • 3,084
  • 1
  • 28
  • 44

5 Answers5

7

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.

Yacoub Oweis
  • 352
  • 4
  • 11
6

Embedly is paid. Free alternative is Noembed. :)

Bob Stein
  • 16,271
  • 10
  • 88
  • 101
4

No, there is no current support for oEmbed. You have two options (maybe more, but two that I know of):

  1. Embedly http://embed.ly/
  2. Engineer yourself an embedding solution for Facebook using the standard form of Facebook video embeds, eg:

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>

Matthew Johnston
  • 4,409
  • 2
  • 20
  • 27
1

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

Bilbo
  • 358
  • 1
  • 10
0

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

Shobhit Sharma
  • 604
  • 1
  • 9
  • 18