0

D7.37:

I am Trying to embed Facebook Videos and cannot find a way to do it.

Points:

  1. Have already installed: Media-Module, Oembed, Media-YouTube, but cannot get Oembed to actually embed anything.
  2. The Media-YouTube works; I can embed YouTube Videos.
  3. I can embed SoundCloud Audio.
  4. I can embed Flickr Images.
  5. I cannot get anything Facebook related to embed.
  6. Is this even possible in D7?
  7. I tried downloading the Video-Lightbox software, but it would not take URL's from Facebook.

When I try to “cut & paste” the Facebook URL into the Video-Light-Box software, the URL seems to be loading then just terminates producing nothing. If I do the same thing with a YouTube-Video an actual file is embedded.

When I try to embed the Facebook URL via the Media-Module-Browser, I get an error “SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'oembed://https%3A//www.facebook.com/AnimalsAustralia/videos/1015' for key 'uri'”; however the file brokenly loads and then is only available as a Link to Facebook NOT an Embed.

When I try to embed the Facebook URL via the WYSIWYG-Editor-AddMedia Button, either as a new Facebook URL or an entry from the Media-Library, a small Icon appears which is also only a Link and not an Embed.

When I try to embed the Facebook URL via the WYSIWYG-Editor-AddMedia Button, but wrapped in [embed] {Facebook URL} [/embed] tags, I receive an “Unable to handle the provided embed string or URL” error message.

BTW I have scoured the settings to be sure that "Rendered-File" is selected in the Media-Display settings of this Content-Type. I have a Content-Type set up specifically for handing Media and configured to allow Remote Media Types of Video.

What might I be missing?

5
  • Are you looking specifically for a Media-module solution, or are you just trying to get the videos embedded? While YouTube uses an iframe, Facebook uses a script tag, which your text format may be stripping out.
    – choster
    Commented May 25, 2015 at 17:33
  • No, I would prefer a Media-Module solution or an OEmbed solution, but at this stage anything is an option. I can see that probably Facebook gains nothing by sending its cherished content to other sites as embeds, so Facebook probably is not in any hurry to provide a solution. Commented May 25, 2015 at 18:27
  • BTW, I have tried just a "cut & paste" approach to the Facebook Video in an Article-Content-Type, but that fails as well. AND I used the FULL-HTML-Option. Commented May 25, 2015 at 18:28
  • Can you specify whether the player loads and doesn't play, or whether the the player doesn't load at all? Facebook video embeds seem to work fine for me. demo.latticegroup.com/node/7
    – choster
    Commented May 25, 2015 at 18:54
  • Because there is no way to format these responses, I have added the response into the original Question above. Commented May 25, 2015 at 20:43

1 Answer 1

1

I was able to embed facebook, youtube and vimeo videos in a view using just the following:

  1. Drupal version: 7.54
  2. Media Module version: 7.x-2.0-rc5
  3. Media: oEmbed Module version: 7.x-2.7
  4. Entity view modes module: 7.x-1.0-rc1 // optional

Facebook URL: https://www.facebook.com/video.php?v=10153231379946729

Try the above URL format. If the video still won't embed, then it's probably the configuration.


My media field in the content type is setup as follows:

  1. Field Type: File
  2. Widget: Media Browser
  3. Enabled browser plugins: Upload and Web
  4. Allowed file types: Image and Video
  5. Allowed URI schemes: oEmbed resources and Public files
  6. Allowed file extensions for uploaded files: png, gif, jpg, jpeg

Note this field supports both images and videos.


Then you need to setup your file display for videos here:

/admin/structure/file-types/manage/video/file-display

I used the Entity view modes module to create a a new view mode for this field. Then I selected the oEmbed formatter for my view mode.


Then in the view, select the Rendered file formatter and the view mode you created.


Then when creating the node, try the above url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.