How to choose the default image to show for a Facebook Like

Posted by Community Admin on 04-Aug-2018 10:39

How to choose the default image to show for a Facebook Like and Share buttons?

All Replies

Posted by Community Admin on 29-Jun-2012 00:00

Hello,

I am using the facebook like and share buttons on my Sitefinity news item widget.

The Og:image meta tag is what Facebook uses to identity the image of the web page which will show as a thumbnail whenever it shows the web page's link anywhere.

If you don't use this meta tag, then facebook will try to read the web page and identify some of the images which could be shown as a thumbnail and it might select an image which might not be the best image which I would like it to show up with the link (news item).

Can I add a custom field for the thumbnail in the news widget and make use of it to update the meta tag?

Thanks for whatever pointers anyone can give me.
Fadi Raheel

Posted by Community Admin on 08-Nov-2012 00:00

I'd like to know this as well.  We also have a need to apply the og:image meta tag to multiple pages.  It would be nice to define some default values in one place...Then have "overrides" per page and the rest of the FB meta taga ideally auto-generate by using the page properties.

Posted by Community Admin on 13-Nov-2012 00:00

Hello,

 Take a look at this article which discusses how to set multiple images on the og: tag for the facebook share utility. Most importantly take a look at this solution:

The og:image meta tag you are using is called by Facebook's servers after the user clicks your share button. So if you are trying to change this and have the person click the share button, this won't work. If you want to support multiple og:images on your page you could use different query parameters for each image.

For example: www.mysite.com/mypage would render the metatag like

<meta property="og:image" content="www.mysite.com/myimage.jpg" /> 

Then you could also have for example:
www.mysite.com/mypage
that would render the metatag like

<meta property="og:image" content="www.mysite.com/anotherimage.jpg" /> 

Another way you could do this is would just be to ask the user for stream_publish permission and use the Graph API to send the post directly to facebook yourself. You can find out more about this approach here: http://developers.facebook.com/docs/reference/api/post

Let me know if this doesn't clear things up.

Kind regards,
Patrick Dunn
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed