• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Problem With Facebook Video

tafreehm

Well-known member
#1
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
 

tafreehm

Well-known member
#6
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
 

Brogan

XenForo moderator
Staff member
#9
Then Facebook have changed something.

Perhaps they are now restricting embedding externally.
 

EQnoble

Well-known member
#14
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
 

0xym0r0n

Well-known member
#15
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.
 

EQnoble

Well-known member
#16
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
 

Brogan

XenForo moderator
Staff member
#19
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}
 

0xym0r0n

Well-known member
#20
: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