Tuesday, 24 February 2015

How to share Embed youtube video on facebook From my website

How to share Embed youtube video on facebook From my website

Following are two steps


1. Get video-code from YouTube URL video URL
Suppose you have following youtube video.

https://www.youtube.com/watch?v=adn45xIFa4g

Now get the video-Code i.e adn45xIFa4g from YouTube URL.

2. Update the following meta tags (fill Video Code)
<meta property="og:title" content="How to share Embed youtube video on facebook From my website"  />
<meta property="og:description" content="How to share Embed youtube video on facebook From my website" />
<meta property="og:url" content="http://www.web-technology-experts-notes.in/2015/02/how-to-share-embed-youtube-video-on-facebook-from-my-website.html" />
<meta property="og:type" content="video" >
<meta property="og:image" content="http://i1.ytimg.com/vi/adn45xIFa4g/maxresdefault.jpg" />
<meta property="og:video" content="http://www.youtube.com/e/adn45xIFa4g" />
<meta property="og:video:height" content="268" />
<meta property="og:video:width" content="480" />

<!-- DON'T FORGET TO ADD META TAGS FOR HTTPS -->
<meta property="og:url:secure_url" content="http://www.web-technology-experts-notes.in/2015/02/how-to-share-embed-youtube-video-on-facebook-from-my-website.html" >
<meta property="og:image:secure_url" content="https://i1.ytimg.com/vi/adn45xIFa4g/maxresdefault.jpg" />
<meta property="og:video:secure_url" content="https://www.youtube.com/e/adn45xIFa4g" >
<!-- DON'T FORGET TO ADD META TAGS FOR HTTPS -->

3. Paste the above meta tags before the closing of head tag (</head>)