Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Embed Facebook videos with JW Player


Hello guys!

I just want to ask how to Embed Facebook videos using JW Player like this site: http://www.narutospot.net/naruto-shippuden/naruto-shippuden-episode-201/

Thank you!

16 Community Answers

JW Player

User  
1 rated :

@raven

may I suggest that you first start with the following documentation

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5

I read it often in fact have a shortcut link to it on my desktop.

JW Player

User  
0 rated :

Willie I didnt find the answer of my question there.

JW Player

User  
0 rated :

anymore reply please! thanks!

Ethan Feldman

JW Player Support Agent  
0 rated :

@willie/raven:

This is the proper documentation to read:

http://www.longtailvideo.com/support/blog/19150/watch-your-videos-on-facebook-using-the-jw-player
http://www.longtailvideo.com/support/addons/sharing-plugin/14048/facebook-video-sharing

JW Player

User  
0 rated :

I think you guys dont understand me.

If you check in the page: http://www.narutospot.net/naruto-shippuden/naruto-shippuden-episode-201/

The page used facebook video while the player is jw player.

This is the code:

<embed type="application/x-shockwave-flash" src="http://www.narutospot.net/narutospot.swf" flashvars="file=http%3A%2F%2Fvideo.l3.fbcdn.net%2Fcfs-l3-snc6%2F79066%2F509%2F108035259276559_6935.mp4%3Foh%3D886e9d63cd60c0728cf84bd4196940b8%26oe%3D4DEC4700%26l3s%3D20110603200824%26l3e%3D20110605201824%26lh%3D0a8f58d9346b92041ca22&plugins=hd-1,fbit-1&dock=true&hd.file=http://www.narutospot.net/fb/i/dl2.php?id=http://video.l3.fbcdn.net/cfs-l3-snc6/79127/509/108035259276559_18789.mp4&hd.state=false&skin=http://www.narutospot.net/files/skins/modieus.swf&type=video&image=http://www.narutospot.net/files/play.jpg" width="712" height="500" allowfullscreen="true" quality="high" wmode="opaque"></embed>

I am currently using facebook video to my site and my code is something like below.

<object width="600" height="400" ><param name="allowfullscreen" value="true" />
<param name="movie" value="http://www.facebook.com/v/FACEBOOK_VIDEO_ID" /><embed src="http://www.facebook.com/v/FACEBOOK_VIDEO_ID" type="application/x-shockwave-flash" allowfullscreen="true" width="600" height="400" wmode="transparent"></embed></object>

My question now is how can i embed facebook videos using jw player like the first code above?

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, question, is the link above your site?

JW Player

User  
0 rated :

No..I just found the site thru this site: https://www.odesk.com/jobs/~~b2164c3b742c09bb?_redirected, while searching the method he uses.

Ethan Feldman

JW Player Support Agent  
0 rated :

So then can you provide a link to where you are trying to do this yourself so we can actually help you?

JW Player

User  
0 rated :

How would a link even be necessary for you guys to actually help him?

JW Player

User  
0 rated :

Hello, I am also trying to do what the author of this thread said. I am simply lost on how to attempt this. I have seen the author's embed code:
<embed type="application/x-shockwave-flash" src="http://www.narutospot.net/narutospot.swf" flashvars="file=http%3A%2F%2Fvideo.l3.fbcdn.net%2Fcfs-l3-snc6%2F79066%2F509%2F108035259276559_6935.mp4%3Foh%3D886e9d63cd60c0728cf84bd4196940b8%26oe%3D4DEC4700%26l3s%3D20110603200824%26l3e%3D20110605201824%26lh%3D0a8f58d9346b92041ca22&plugins=hd-1,fbit-1&dock=true&hd.file=http://www.narutospot.net/fb/i/dl2.php?id=http://video.l3.fbcdn.net/cfs-l3-snc6/79127/509/108035259276559_18789.mp4&hd.state=false&skin=http://www.narutospot.net/files/skins/modieus.swf&type=video&image=http://www.narutospot.net/files/play.jpg" width="712" height="500" allowfullscreen="true" quality="high" wmode="opaque"></embed>


I figured that if I trace the mp4 file of my facebook video, I could replace it in the embed code as a test and it should work. It however does not. This is a test video file I was using: http://video.ak.fbcdn.net/cfs-ak-ash4/232116/807/10150310720387526_40687.mp4?oh=fd37fdc62ec8fbf3fd8ad5e90023de56&oe=4E20C600&__gda__=1310770688_8e862ad2cc8318938f47b9d9855052bf

If I embed his code on my website, his facebook video plays perfectly within the jw player. If I replace that with my video link, it says access denied. I've tried using other videos with privacy set to everyone, but that does not work. I am completely lost, any help is appreciated!

Ethan Feldman

JW Player Support Agent  
0 rated :

@thatguy – I usually use deugging tools to figure out what is going on. So, seeing a link when something on the player, which is used on the web, is pretty much needed.

@FairyT – Facebook’s CDN blocks people from using their videos in other player’s than their own, that might be the issue.

JW Player

User  
0 rated :

Sorry, but I'm not quite sure what CDN means.
Since posting this, I've tried something else. I found another website using a similar method as the code the original poster of this thread posted:

<script type='text/javascript' src='http://narutotown.com/wp-includes/js/l10n.js?ver=20101110'></script>
<script type='text/javascript' src='http://narutotown.com/wp-content/uploads/jw-player-plugin-for-wordpress/player/jwplayer.js?ver=3.1.2'></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js?ver=3.1.2'></script>
<script type='text/javascript' src='http://narutotown.com/wp-includes/js/swfobject.js?ver=2.2'></script>
<script type='text/javascript' src='http://narutotown.com/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<div id="jwplayer-1-div" name="jwplayer-1-div">
<div id="jwplayer-1"></div>
</div>
<script type="text/javascript">jwplayer("jwplayer-1").setup({flashplayer: "http://narutotown.com/wp-content/uploads/jw-player-plugin-for-wordpress/player/player.swf", width: "712", height: "475", controlbar: "bottom", "file": "http://www.narutospot.net/fb/i/dl2.php?id=http://video.l3.fbcdn.net/cfs-l3-snc6/79127/509/108035259276559_6945.mp4", "type": "video", events: {}, config: "http://narutotown.com/wp-content/uploads/jw-player-plugin-for-wordpress/configs/narutotown.xml"});</script>


What I found interesting with this is the 108035259276559_6945.mp4. This is part of the facebook video URL:
http://video.l3.fbcdn.net/cfs-l3-ash4/232066/784/132462306833854_39089.mp4?oh=798c0018152c697869b0f968a6eb2529&oe=4E220700&l3s=20110714143744&l3e=20110716144744&lh=0b512a2b0f7199ca6ca35

It's the part right before the Mp4. By seeing this, my idea was to replace this part with the corresponding part on another facebook video. I found one of facebook's public videos (because it uses l3 and similar url structure), and tried to replace this "id", as follows:
For this video:
http://video.l3.fbcdn.net/cfs-l3-snc6/78958/117/10150349956720484_7932.mp4?oh=7247aea5be4ceb7169491a2e114e0976&oe=4E220900&l3s=20110714144616&l3e=20110716145616&lh=0387b899819f22d91448d

I used this code:
<script type='text/javascript' src='http://narutotown.com/wp-includes/js/l10n.js?ver=20101110'></script>
<script type='text/javascript' src='http://narutotown.com/wp-content/uploads/jw-player-plugin-for-wordpress/player/jwplayer.js?ver=3.1.2'></script>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js?ver=3.1.2'></script>
<script type='text/javascript' src='http://narutotown.com/wp-includes/js/swfobject.js?ver=2.2'></script>
<script type='text/javascript' src='http://narutotown.com/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<div id="jwplayer-1-div" name="jwplayer-1-div">
<div id="jwplayer-1"></div>
</div>
<script type="text/javascript">jwplayer("jwplayer-1").setup({flashplayer: "http://narutotown.com/wp-content/uploads/jw-player-plugin-for-wordpress/player/player.swf", width: "712", height: "475", controlbar: "bottom", "file": "http://www.narutospot.net/fb/i/dl2.php?id=http://video.l3.fbcdn.net/cfs-l3-snc6/79127/509/10150349956720484_7932.mp4", "type": "video", events: {}, config: "http://narutotown.com/wp-content/uploads/jw-player-plugin-for-wordpress/configs/narutotown.xml"});</script>


This does not work however... My only idea from this is that the file: http://www.narutospot.net/fb/i/dl2.php is doing something that is allowing these mp4 urls (which do not actually end in .mp4) to be streamed within the JW player.

I don't know if this is within your area of expertise. This post is very long, I apologize for that. If you have any ideas they would be greatly appreciated, I've been trying to get this to work for a long time now.

PS: I don't think I supplied the URL of the page I found using the script. The site is: http://narutotown.com/6842/watch-naruto-shippuden-216-english-subbed

JW Player

User  
0 rated :

Oh about that
108035259276559_6945.mp4
part, it looks like I accidentally pasted an alternative URL relating to narutospot.net instead of narutospot.com (i was testing to see if they worked with one another sorry).
the actual script for that part is:
<script type="text/javascript">jwplayer("jwplayer-1").setup({flashplayer: "http://narutotown.com/wp-content/uploads/jw-player-plugin-for-wordpress/player/player.swf", width: "712", height: "475", controlbar: "bottom", "file": "http://narutotown.com/player/naruto.php?id=132462306833854", "type": "video", events: {}, config: "http://narutotown.com/wp-content/uploads/jw-player-plugin-for-wordpress/configs/narutotown.xml"});</script></p>
The id going into naruto.php is from:
http://video.l3.fbcdn.net/cfs-l3-ash4/232066/784/132462306833854_39089.mp4?oh=798c0018152c697869b0f968a6eb2529&oe=4E220700&l3s=20110714143744&l3e=20110716144744&lh=0b512a2b0f7199ca6ca35

Ethan Feldman

JW Player Support Agent  
0 rated :

What I mean is that Facebook is hosting the videos, and they block certain browsers from using their bandwidth.

JW Player

User  
0 rated :

I don't think FB block based on browser. What makes you say that?

Ethan Feldman

JW Player Support Agent  
0 rated :

You can tell. I have tried to do the embed and it works in some browsers but not others. The bottom line is, you are using their bandwidth, and they probably don’t like that.

This question has received the maximum number of answers.