How to embed Facebook videos in web pages / wordpress posts?

So, you might have heard that Facebook recently introduced the facility of embedding Facebook videos in your web pages. This essentially means that Facebook content can now be shared outside of their platform much like how we share YouTube or Vimeo videos.
I however tried to use this functionality but am not getting the expected results.

I have a wordpress blog and I tried embedding the Facebook video by using the code provided by Facebook.

Here's what I did.

1. Go to Facebook video page. Below the video on the right hand side there's a link called 'Embed Video'. Click on it.

Screen Shot 2015-04-27 at 8.55.59 am

2. On clicking the link, an overlay appears where you can copy the embed code. Here's what it looks like:

Screen Shot 2015-04-27 at 8.57.37 am

3. I copied the code and pasted it in my WordPress post.

But it just doesn't work! 👎😔

Then I tried a different method -

Every video on Facebook has a unique ID string that can be seen in the URL.
The ID lies next to the parameter v.
Example: (?v=XXXXXXXXXXXX).
So, I used the iframe tag:

Just replaced the XXXX with the facebook video ID.
However, still no results.

Is this facility still not working properly from Facebook's side? Has anyone tried it?
Please help.

Replies

  • Manish Goyal
    Manish Goyal
    Can you paste post url here?
  • Ankita Katdare
    Ankita Katdare
    Manish Goyal
    Can you paste post url here?
    Of the facebook video OR wordpress post?
    I didn't publish the post.
  • Manish Goyal
    Manish Goyal
    Wordpress post url, there might be some script conflicts or something,
  • Ankita Katdare
    Ankita Katdare
    Manish Goyal
    Wordpress post url, there might be some script conflicts or something,
    Will try to publish a demo post and paste link here. Meanwhile, could you check if any of the above methods are working on any of your wordpress domains?
  • Manish Goyal
    Manish Goyal
    Just debug the problem, from facebook, the code is something like this

    replace sdk.js with all.js inside your code

    means

    //connect.facebook.net/en_US/sdk.js will be //connect.facebook.net/en_US/all.js

    Demo: #-Link-Snipped-#
  • Manish Goyal
    Manish Goyal
    Wordpress won't allow you to embed scripts inside your post content, mine is on my own hosting i.e why it is working
  • Ankita Katdare
    Ankita Katdare
    Manish Goyal
    Wordpress won't allow you to embed scripts inside your post content, mine is on my own hosting i.e why it is working
    Right! That was the problem! I will check with another domain and update here.
    Meanwhile, could you tell us what difference did replacing sdk.js with all.js make for it to work?
  • Manish Goyal
    Manish Goyal
    I am not sure, all I know is sdk is part of recent version (2.3) of facebook sdk, according to their recent documentation in old code where ever developers are using all.js they should use sdk.js to support latest features.
    since sdk.js was not working, I tried replacing it with all.js and it worked

You are reading an archived discussion.

Related Posts

I have seen that a lot of people have to leave jobs for reasons such as better salary, maternity, paternity, location etc. However, they have to return to the same...
A team of engineers from Northwestern’s McCormick School of Engineering has built a really fast 3D capture camera that works in all environments with equal aplomb. It so happens that...
TRAI has put all your email Ids and thoughts on NetNeutrality out in the public. The telecom regulatory authority of India had asked for people's comments on Net Neutrality and...
Spice Mobiles gained much popularity with its Stellar 526n smartphone that was launched this month at an affordable price with a decent set of features. Today, Spice has come up...
Quote: Low-power systems are all around us, and with the explosion of Internet of Things applications and wearable devices, they will become even more common. Understanding how to implement low-power...