How to choose the default image to show for a Facebook Like and Share buttons?
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
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.
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,