get facebook share to share correct video image
-
- Forum Members
- Posts: 10
- Joined: Wed Aug 08, 2012 9:58 pm
get facebook share to share correct video image
i have a facebook share on a website i have created for a client and it is to share a youtube video.
I use youtubeplayer to embed the videos and a special template to play the videos that displays the vodeo in the page with a random list on the right hand side.
The proble is i have managed to get the facebook share to share the correct video title and video link but it refuses to share the correct video image/thumb.
i have been at this now for 2 weeks and nothing i do seems to work can anybody help?
Thanks in advance.
I use youtubeplayer to embed the videos and a special template to play the videos that displays the vodeo in the page with a random list on the right hand side.
The proble is i have managed to get the facebook share to share the correct video title and video link but it refuses to share the correct video image/thumb.
i have been at this now for 2 weeks and nothing i do seems to work can anybody help?
Thanks in advance.
Re: get facebook share to share correct video image
Got a link? I use Facebook Open graph and assign the thumb from the video and then use that in the open graph settings for the image
Some links on Open Graph:
https://developers.facebook.com/tools/debug
https://developers.facebook.com/docs/op ... yconcepts/
http://dropsoul.com/blog/33/How-to-find ... ok-ID.html
This number is used in the fb:admins content results below.
I've also assigned a field that grabs the description from the post in CGblog, you can do this with a regular page, just use the content block or the another block and assign that.
{*meta description used in the fb open graph used in the CGBlog*}
{assign var='meta_desc' value=$entry->content|truncate:'250'|strip_tags|strip}
Make sure the thumb you call is at least 200 px wide.
Some links on Open Graph:
https://developers.facebook.com/tools/debug
https://developers.facebook.com/docs/op ... yconcepts/
http://dropsoul.com/blog/33/How-to-find ... ok-ID.html
This number is used in the fb:admins content results below.
Code: Select all
{if isset($pagetitle)} {*this is specific for cgblog and or news with this assignment in the top of the detail page, you would create this or use a separate template that has your open graph stuff in the head*}
<!-- Open Graph for facebook
================================================== -->
<meta property="og:title" content="{$pagetitle}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{$canonical}" />
<meta property="og:image" content="{$facebook}"/>
<meta property="og:site_name" content="brief description" />
<meta property="fb:admins" content="XXXX" /> {*put your fb admin number in here*}
<meta property="og:locale" content="en_us" />
<meta property="og:description" content="{$meta_desc}" />
{/if}
{*meta description used in the fb open graph used in the CGBlog*}
{assign var='meta_desc' value=$entry->content|truncate:'250'|strip_tags|strip}
Make sure the thumb you call is at least 200 px wide.
Re: get facebook share to share correct video image
The youtube image you call needs to be at least 200 pix wide
This is an example using cgblog with a custom field called youtube that you only put the id of the video in.
I also have one for vimeo, lemme know.
Code: Select all
http://img.youtube.com/vi/{$entry->fieldsbyname.youtube->value}/0.jpg
I also have one for vimeo, lemme know.
-
- Forum Members
- Posts: 10
- Joined: Wed Aug 08, 2012 9:58 pm
Re: get facebook share to share correct video image
the link is:
jollex.com if you go to view a video the share button is bellow the video i have to fix the layout at present but the basics of everything else works.
It shres all the correct data except the video thumb/image.
Thanks for your help
jollex.com if you go to view a video the share button is bellow the video i have to fix the layout at present but the basics of everything else works.
It shres all the correct data except the video thumb/image.
Thanks for your help
Re: get facebook share to share correct video image
It would be impossible to get the thumb of the video since it's not on the page. The embed of a video doesn't bring in the associated thumbs. There's other images that fit the criteria that are on the page, so it's going to grab whatever and it cycles through them too.
Bring in the thumb onto the page and then capture it, stick it in the open graph stuff since that will make sure that it's the default image.
Here's what the thumb is for the seagulls love donuts or something:
http://img.youtube.com/vi/_q4ewCCBAm4/0.jpg
Bring in the thumb onto the page and then capture it, stick it in the open graph stuff since that will make sure that it's the default image.
Here's what the thumb is for the seagulls love donuts or something:
http://img.youtube.com/vi/_q4ewCCBAm4/0.jpg
-
- Forum Members
- Posts: 10
- Joined: Wed Aug 08, 2012 9:58 pm
Re: get facebook share to share correct video image
Thanks carasmo,
I got it to work as you pointed me in the right direction it was kinda simple really now that i think of it.
all i had to do was as you say pull in the image in a hidden div near the actual video and it worked.
Thanks for your help.
jonathan

I got it to work as you pointed me in the right direction it was kinda simple really now that i think of it.
all i had to do was as you say pull in the image in a hidden div near the actual video and it worked.
Thanks for your help.
jonathan




-
- Forum Members
- Posts: 10
- Joined: Wed Aug 08, 2012 9:58 pm
Re: get facebook share to share correct video image
My client also wants a ratings system say star ratings attached to youtubeplayer videos i have been trying to do this but get totally frustrated as it does not work.
Jonathan
Jonathan
Re: get facebook share to share correct video image
The last post should have been a separate post, but...
Did you put the call for the ratings in the detail template of youtube player..?
Did you put the call for the ratings in the detail template of youtube player..?
-
- Forum Members
- Posts: 10
- Joined: Wed Aug 08, 2012 9:58 pm
Re: get facebook share to share correct video image
Thanks for reply sorry i should have put it in another post my bad.
i tried to do this using the youtube player detail template but it does not save the data it just displays the same rating for all videos.
i tried to do this using the youtube player detail template but it does not save the data it just displays the same rating for all videos.
Re: get facebook share to share correct video image
Now the question is, what module are you using, what does the modules tag look like that you are using..?
-
- Forum Members
- Posts: 10
- Joined: Wed Aug 08, 2012 9:58 pm
Re: get facebook share to share correct video image
I wastrying to use cg feedback module to allow ratings of youtubeplayer videos.