Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to share a video from my website on facebook like youtube

I have a website that has a HTML5 video player.

I want to share the link ( ex: http://site.com/video/example-2 ) on facebook and one the users click on the image of that post on the facebook it starts playing the video there.

Just like youtube videos and vimeo videos.

How can I do that?

Thanks

like image 827
zeroonnet Avatar asked Sep 19 '13 19:09

zeroonnet


People also ask

Can I share my YouTube video link on my Facebook page?

Under the video, click Share . A panel will open, presenting different sharing options: Social networks: Click a social network icon (for example, Facebook, Twitter) to share the video there.

Is it better to upload a video to Facebook or link to YouTube?

In the meantime, the facts are simple. If you want to truly engage your viewers on Facebook, upload your video natively to the platform. Posting a YouTube link just doesn't get the same results.


2 Answers

Facebook no longer permits inline playback for third party players. Vimeo even mentions this in their documentation.

Moving forward you will need to use Facebook's own video hosting platform if you want to have videos play inline in the newsfeed.

like image 196
Julian Avatar answered Sep 24 '22 08:09

Julian


I have a website that has a HTML5 video player.

You want to find a good SWF (*.SWF) video player that can stream video from url={video_Hot_link} (pass URL parameter to the SWF player)

Now after you got your SWF player ready for streaming some videos add Facebook Open Graph to your <head> tag like below:

<meta property="og:type" content="video"> <!-- site/page type more information http://ogp.me/ -->
<meta property="og:video:type" content="application/x-shockwave-flash"> <!-- you need this because your player is a SWF player -->
<meta property="og:video:width" content="Width in Pixels"> <!-- player width -->
<meta property="og:video:height" content="Height in Pixels"> <!-- player height -->
<meta property="og:video" content="http://example.com/{path_to}/{swf_player}.swf?url={video_soure}"> <!-- You will need to echo/print the video source (*.mp4) with server-side code -->
<meta property="og:video:secure_url" content="https://example.com/{path_to}/{swf_player}.swf?url={video_soure}"> <!-- required for users whom use SSL (actually Facebook forces everyone to use SSL so you're required to use og:video:secure_url) so get a one -->

Additionally, you need to add the following prefix to <html> likeso

<html prefix="og: http://ogp.me/ns#">
like image 31
Adam Azad Avatar answered Sep 24 '22 08:09

Adam Azad