facebookoembed

Does facebook support oEmbed?


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


Solution

  • 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.