Fixed Problem With Facebook Video

tafreehm

Well-known member
Hello,
Ever since I upgraded to 1.1.3 facebook videos does not show up. Instead there is a white box.
There are no errors, I am not sure what exactly is causing the error.

This is what I have under "BB Code Media Site: Setting"

Match URL "facebook.com/*photo.php?v={$id:digits}"

Embed HTML:
Code:
<object width="500" height="300" data="http://www.facebook.com/v/{$id}" type="application/x-shockwave-flash">
    <param name="movie" value="http://www.facebook.com/v/{$id}" />
    <param name="allowfullscreen" value="true" />
    <param name="wmode" value="opaque" />
    <embed src="http://www.facebook.com/v/{$id}" type="application/x-shockwave-flash" allowfullscreen="true" wmode="opaque" width="500" height="300" />
</object>

In match url field I changed video.php to photo.php as facebook has changed its url structure for videos. It was working fine until I upgraded to 1.1.3

Please advice.

--------------------------
Here is the fix
 
That doesn't appear to be a valid URL.

Firebug shows it as this: http://www.facebook.com/v/10152270185616808
xenforo does not take/accept updated facebook video url structure. I had to chang photo.php to video.php which does not support by fb anymore. However, Its acting same on my forum as well. Even though, my forum auto embeds the updated facebook' URL structure.

Why don't you try to post something and see if that works.
https://www.facebook.com/photo.php?v=156057317891198
 
Then Facebook have changed something.

Perhaps they are now restricting embedding externally.
 
new Embed HTML:

Code:
<iframe src="https://www.facebook.com/video/embed?video_id={$id}" width="640" height="360" frameborder="0"></iframe>


I don't remember what the default Match URLs: was but I switched it to use regex and used this
Code:
#www\.facebook\.com\/photo.php\?v=(?P<id>[0-9]+)(\S)*#siu
 
I literally just tried to embed a video. I can link to it for anyone to see, but I can't embed it! :(
Tried doing a lot of things but I just get a blank video if i try to embed it.
 
Match URLs:
Code:
#www\.facebook\.com\/photo.php\?v=(?P<id>[0-9]+)(\S)*#siu

Embed HTML:
Code:
<iframe src="https://www.facebook.com/video/embed?video_id={$id}" width="640" height="360" frameborder="0"></iframe>

Advanced options Tab--> Use 'Match URLs' as PCRE regular expressions: checked
 
You just need to switch to the iframe code which has already been posted above.

Code:
<iframe src="http://www.facebook.com/video/embed?video_id={$id}" width="640" height="360" frameborder="0"></iframe>

For Match URLs you can use this:
Code:
facebook.com/*video.php?v={$id:digits}
facebook.com/*photo.php?v={$id:digits}
 
:love: Thanks brogan. I was trying to use EQnoble's code but it didn't work.
I see where I went wrong too!
When I tried to modify the match URLs I didn't know I had to use :digits and was just using $id
 
Top Bottom